In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to analyze SSH and SCP commands in Linux system, the content is very detailed, interested friends can refer to, hope to be helpful to you.
If the port of ssh is 22, you don't have to specify the-p or-P options.
1. Ssh
Linux uses the ssh command to log in to the Linux server:
Ssh-l root-p 188 192.168.1.2
Ssh-l user name-p port number hostname or IP
Just enter the password.
2. Scp
The scp command copies a file or directory command:
Copy the file:
(1) copy local files to remote
Scp-P 22 filename username @ computer IP or computer name: remote path
Scp-P 22 test.txt root@192.168.1.163:/opt/
(2) copy files back to the local area remotely
Scp-P 22 user name @ computer IP or computer name: file name local path
Scp-P 22 root@192.168.1.163:/opt/test.txt / opt
Copy the directory:
(1) copy the local directory to the remote
Scp-r-P 22 directory name user name @ computer IP or computer name: remote path
Scp-r-P 22 / opt/test/ root@192.168.1.163:/opt/
(2) copy the directory back to the local area remotely
Scp-r-P 22 user name @ computer IP or computer name: directory name local path
Scp-r-P 22 root@192.168.1.163:/opt/test/ / opt/
3. Usage problem
If scp can be used on this machine, an error will be reported when scp uploads the file:
Bash: scp: command not found
Lost connection
Then the other party does not have the openssh-clients package installed.
Sftp command
Securecrt presses ALT+P to start a new session for ftp.
Enter: help command to display all the commands provided by the FTP
Pwd: query the directory of the linux host (that is, the remote host directory)
Lpwd: query local directory (local directory) ls: query which files are connected to the directory of the current linux host
Lls: query the files in the current local upload directory
Lcd: change the path of the local upload directory
Cd: change the remote upload directory
Get: download files from a remote directory to a local directory
Put: uploads files from a local directory to a remote host
Get-r: download directory
Put-r: upload directory
What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.
On the Linux system on how to analyze SSH and SCP commands to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.