Operating system: Introduction to SFTP related knowledge

Operating system: Introduction to SFTP related knowledge

Today I will share with you some knowledge about SFTP, I hope it will be helpful to you!

1. What is SFTP?

SFTP (SSH File Transfer Protocol) is a secure file transfer protocol based on SSH (Secure Shell). Using the SFTP protocol can provide a secure network encryption algorithm during file transfer, thereby ensuring the secure transmission of data. In the Linux operating system, the default port of SFTP is 22. The transmission provides a password and key authentication mechanism, which can effectively prevent threats and public technology during the transmission process.

2. SFTP Composition

Server: The host where the SFTP service is installed, usually a Linux server. Windows servers can also install the SFTP service through software, such as freeSSHd software. Client: The client that installs the software to access the SFTP server, such as XFTP, WinSCP, FileZilla, FlashFXP and other clients.

3. SFTP verification connection method

  • Account and password verification: Use account ID and password for verification, and the credentials are encrypted during the verification process.
  • SSH key authentication: Authentication is performed using an SSH password.
  • Account password + SSH key mixed verification: Both verifications must be met before a connection can be made.

4. Common SFTP commands

4.1 Login

 #Password login
sftp -P 22 [email protected]
#Key login
sftp -P 22 -i ~/.ssh/id_rsa [email protected]

4.2 Basic Operations of SFTP Shell

 #Current working directory:
pwd
#View the files in the current directory:
ls
ls -la
# Change directory:
cd
#Local working directory:
lpwd
#View the files in the local working directory:
lls
#Switch the local working directory:
lcd dirname

4.3 Download server files to local

 #Download the server file to local
get remote_file_name
#Rename
get remote_file_name local_file_name
#recursion
get -r some_directory_name
#Keep the original file attributes and date
get -Pr some_directory_name

4.4 Upload local files to remote server

 #Upload local files to the remote server
put localFile
#recursion
put -r local_directory_name

<<:  Do you know two common communication methods of Vue?

>>:  By the end of 2021, my country will have 10.1 5G base stations per 10,000 people

Recommend

What exactly is “5G New Call”?

In today’s article, let’s talk about a very popul...

Hostodo: $15/year-1GB/15G NVMe/3TB/Las Vegas & Tampa data centers

It has been more than a year since the last time ...

Can IPFS become the next generation Internet protocol?

This article will analyze the characteristics of ...

6G is coming? Is it too early to start 6G research now?

With the implementation of 5G, the direction of m...

Inspur Networks launches smart AP to connect new wireless ecosystem

With the rapid development and popularization of ...

AIOps implementation revealed! See how three WOT experts make AIOps a reality

[51CTO.com original article] On June 21, the WOT2...