Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed introduction of FTP and SSH servers commonly used in Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "detailed introduction of Linux common servers FTP and SSH". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Linux common server building-ftp server

Ftp server

FTP is the English abbreviation of File Transfer Protocol (File transfer Protocol), while the Chinese abbreviation is "text transfer Protocol".

Used for two-way transfer of control files on Internet.

It is also an application (Application). There are different FTP applications based on different operating systems, and all of these applications follow the same protocol to transfer files.

In the use of FTP, users often encounter two concepts: "Download" and "Upload".

A "download" file is to copy a file from a remote host to your own computer.

To "upload" a file is to copy the file from your computer to a remote host. In the Internet language, users can upload (download) files to (from) a remote host through a client program.

1. Install the vsftpd server

Sudo apt-get install vsftpd

two。 Configure the vsftpd.conf file

Sudo vi / etc/vsftpd.conf

3. Test upload function, log in to ftp server

Ftp IP

4. Upload command, you can upload files to the ftp server

Put somefile

5. Download command, you can download the files on the ftp server to the local

Get somefile

Ftp client (filezilla) with graphical interface

2. Linux common server construction-ssh and scp

Ssh introduction

SSH is the abbreviation of Secure Shell and was developed by IETF's Network working Group (Network Working Group). SSH is a security protocol based on the application layer and the transport layer.

SSH is currently a reliable protocol designed to provide security for remote login sessions and other network services. It is often used for remote login and for copying data between users.

The use of SSH protocol can effectively prevent information leakage in the process of remote management. SSH was originally a program on the UNIX system, and then rapidly expanded to other operating platforms. When used correctly, SSH can make up for loopholes in the network. The SSH client is suitable for a variety of platforms. Almost all UNIX platforms-including HP-UX, Linux, AIX, Solaris, Digital UNIX, Irix, and others-can run SSH.

To use the SSH service, you need to install the appropriate server and client. Client-server relationship: if machine A wants to be remotely controlled by machine B, then machine A needs to install SSH server and machine B needs to install SSH client.

Install ssh

a. Install the ssh server

Sudo apt-get install openssh-server

b. Remote landing

Ssh user name @ IP

Use ssh access, such as an error in the access. You can check to see if there is a file ~ / .ssh/known_ssh attempts to delete the file solution.

Connect to the server using ssh

SSH tells the user that the host is not recognized. Type "yes" at this time, and SSH will write the relevant information into "~ / .ssh/know_hosts", visit it again, and there will be no such information. After entering the password, you can log in to the host.

. Scp

A common way to copy files remotely, scp-r:

1. The prerequisite for using this command requires that the target host has successfully installed openssh-server

Use sudo apt-get install openssh-server to install if there is no installation

two。 Use format:

Scp-r target user name @ target host IP address: / absolute path to the target file / absolute / relative path saved to the local machine example: scp-r itcast@192.168.1.100:/home/itcast/QQ_dir/. / mytest/lisi will prompt for "yes" at a later time, you can only type "yes" instead of "Y"

You can copy a single file without the-r parameter, and the copy directory must be added.

Copy local files to the remote:

Scp FileName RemoteUserName@RemoteHostIp:RemoteFile scp FileName RemoteHostIp:RemoteFolder scp FileName RemoteHostIp:RemoteFile

Copy the local directory to the remote:

Scp-r FolderName RemoteUserName@RemoteHostIp:RemoteFolder scp-r FolderName RemoteHostIp:RemoteFolder

Copy remote files locally:

Scp RemoteUserName@RemoteHostIp:RemoteFile FileName scp RemoteHostIp:RemoteFolder FileName scp RemoteHostIp:RemoteFile FileName

Copy the remote directory locally:

Scp-r RemoteUserName@RemoteHostIp:RemoteFolder FolderName scp-r RemoteHostIp:RemoteFolder FolderName "detailed introduction of Linux common servers FTP and SSH" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report