Current location - Quotes Website - Team slogan - Sftpsftp command
Sftpsftp command
1, the difference between SFTP and FTPS is 2. How does SFTP upload the entire folder to the server? 3. What's the difference between 3.sftp and ftp? 4.sftp command 5. How to start the Sftp service of linux server 6? What's the difference between linux scp, FTP and sftp? What's the difference between SFTP and FTPS? The differences between SFTP and FTPS are as follows:

1, differences in references

(1)FTPS: It is one of the protocols in the TCP/IP protocol group.

(2)SFTP: Secure File Transfer Protocol. A secure network encryption method can be provided to transmit files.

2. Differences in characteristics

(1) FTPS: FTPS protocol uses two ports, 20 and 2 1, in which TCP is used to transmit data and 2 1 is used to transmit control information.

(2) SFTP: SFTP itself does not have a separate daemon, and the sshd daemon (default port number is 22) must be used to complete the corresponding connection and reply operations. Therefore, in a sense, SFTP is not like a server program, but more like a client program.

3. Differences in usage patterns

(1) FTPS: FTPS server is used to store files. Users can use FTPS client to access resources located on FTPS server through FTPS protocol.

(2) SFTP: a part of SSH, which is a safe method to transfer files to the Blogger server.

How does SFTP upload the entire folder to the server? When using sftp to transfer folders in SecureSRT, there is a small detail that deserves SFTP's attention:

1) Add "/"after the folder name dirname. After transmission, there is no new folder dirname at the destination, only files under the dirname folder.

For example:

sftp get -r smsrc/

2) Do not add "/"after the folder name dirname. After the transfer, a new folder directory name will be created in the target location, and all file locations will be created under the new folder directory name.

For example:

sftp get -r smsrc

What's the difference between sftp and ftp? First of all, FTP protocol

FTP is one of the protocols of sftp in TCP/IP protocol group. TP protocol consists of two parts: 1, FTP server, which is used to store files; 2.FTP client. Users can use ftp client to access sftp resources on FTP server through FTP protocol.

By default, the FTP protocol uses 20 and 2 1 TCP ports. Port 2 1 is used to transmit control information. Whether to use port 20 for data transmission is related to the transmission mode used by FTP. If passive mode is adopted, the server and the client should negotiate which port to use. There are two FTP transfer modes:

① Active mode

The FTP client first establishes a connection with the TCP2 1 port of the FTP server and sends commands through this channel. When the client needs to receive data, it sends port commands on this channel. The PROT command contains the port used by the client to receive data. When transmitting data, the server uses its own TCP.

Port 20 is connected to the designated port of the client to send data.

② Passive mode

When establishing the control channel, it is similar to the active mode, but after establishing the connection, it is the Pasv command. After receiving the Pasv command, the FTP server randomly opens a high-end port to inform the client of the request to transmit data on this port. The client connects to this port of the FTP server, establishes a channel through three-way handshake, and then the FTP server transmits data through this port.

Second, the SFTP protocol.

SFTP is SSH file transfer.

Short for Secure File Transfer Protocol. SFTP and FTP have almost the same syntax and functions. SFTP is a part of SSH, which is a safe way to transfer files to the Blogger server. In fact, SSH software includes a secure file information transmission subsystem called SFTP. SFTP itself has no independent daemon, and it must use sshd daemon to complete the corresponding connection and reply operations, so in a sense, SFTP is not like a server program, but more like a client program.

Third, the main difference between the two.

Link mode: FTP uses the control connection on TCP port 2 1 to establish the connection. SFTP is a secure connection between client and server to transfer files through SSH protocol.

Security: SFTP uses encryption to transmit authentication information and data, so it is very safe to use SFTP compared with FTP.

Efficiency: SFTP adopts encryption and decryption technology, so the transmission efficiency is much lower than that of ordinary FTP.

SFTP command SFTP is the abbreviation of SSH file transfer protocol FTP and secure file transfer protocol. SFTP and FTP have almost the same syntax and functions. SFTP is a part of SSH, which is a secure way to transfer files to the Blogger server. In fact, SSH package already contains sftp, a secure file information transmission subsystem named SFTP. SFTP itself has no independent daemon, and it must use sshd daemon (port number defaults to 22) to complete the corresponding connection and reply operations, so in a sense, SFTP is not like a server program, but more like a client program.

Sftp hostip- default user login.

Sfttpuser @ hostip-Specify the user "user" to log in.

After that, you will be prompted to enter the user password for verification. After the verification is successful, you will log in successfully and can operate the command.

Order? You can view the command help information as follows.

How to start the sftp service of linux server can be set as follows:

1. Create the sftp group sftp, groupadd sftpsftp, and use cat /etc/group to command the information of the group after creation.

2. Create an sftp user mysftp and add it to the created sftp group. At the same time, modify the passwords of Mysftp, useradd-gsftp-s/bin/false mysftp and passwd mysftp.

3. Create a new directory/data/sftp/mysfttp and designate it as the home directory of users in mysfttp group, mkdir-p/data/sftp/mysfttp, usermod-d/data/sftp/mysfttp.

4. Edit the configuration files /etc/ssh/sshd_config, vi /etc/ssh/sshd_config, and comment out the following lines with the # symbol.

5. Set the permissions of Chroot directory, chownroot: sftp/data/sftp/mysftp, chmod 755 /data/sftp/mys.

6. Create a new directory for stp user mysftp to upload files. The owner of this directory is mysftp. All groups are sftp, and the owner has write permission. All groups have no write permission, mkdir /data/sftp/mysftp/upload, chown mysftp: sftp/data/sftp/mysftp/upload, chmod755/data/SFTP/MYSFTP.

7. Close selinux and restart sshd service, and then test.

8. Verify the sftp username @ip address on other servers.

1, sftp is the abbreviation of Secure File Transfer Protocol, which is a secure file transfer protocol. It can provide a secure network encryption method for transmitting files. Sftp and ftp have almost the same syntax and functions. SFTP is a part of SSH, which is a safe way to transfer files to the Blogger server.

2. In fact, SSH package already contains sftp, which is a secure file information transfer subsystem named SFTP (Secure File Transfer Protocol). SFTP itself has no independent daemon, and it must use sshd daemon (port number defaults to 22) to complete the corresponding connection and reply operations, so in a sense, SFTP is not like a server program, but more like a client program.

What's the difference between linux scp, ftp and sftp? Transferring files is faster. Ftp protocol transfers files faster.

The differences are as follows:

First, refer to different

1, scp: sftp is used to copy remote files, which is the most convenient and useful command in SSH.

2.ftp: It is one of the protocols in the TCP/IP protocol group.

3. Secure file transfer protocol. It can provide a secure network encryption method for transmitting files.

Second, it is used in different ways.

1, scp:scp will ask sftp for your password or password when it needs to be verified.

2. FTP: The FTP server is used to store the file sftp, and users can use the FTP client to access the resources located on the FTP server through the FTP protocol.

3.sftp: sftp is a part of SSH and a safe way to transfer files to the Blogger server.

Third, the characteristics are different.

1, scp: Use ssh for data transmission, use the same authentication method as ssh, and provide the same security.

2.ftp: The next FTP protocol uses two TCP ports, 20 and 2 1, of which 20 is used to transmit data and 2 1 is used to transmit control information.

3.sftp:sftp itself has no independent daemon, and it must use sshd daemon (port number defaults to 22) to complete the corresponding connection and reply operations, so in a sense, SFTP is not like a server program, but more like a client program.

Baidu encyclopedia -scp

Baidu encyclopedia -FTP protocol

Baidu encyclopedia -sftp