Linux Advanced Commands (XI): remote login, remote copy command, able to write remote copy, remote login command

Remote login, remote copy command


learning target

  • Be able to write remote copy, remote login command

1. Introduction remote login, remote copy command

command Explanation
ssh Remote Login
scp Remote Copy

Use 2. ssh command

ssh is a security protocol designed for remote login provided, commonly used in telnet, ssh want to use the service, you need to install the appropriate server and client software after the software is installed successfully when you can use the ssh command, and later by remote server operating between remote login.

Telnet renderings:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-BPZ2ot1o-1583935218322) (imgs / ssh.png)]

Software installation steps:

  1. If Ubuntu as a server, you need to install ssh server software execute the command:. Sudo APT-GET-install OpenSSH Server
  2. If the client computer is macOS system you do not need to install ssh client software has been installed by default, and can be used directly ssh command
  3. If the client computer is a Windows system, you need to install OpenSSH for Windows software

ssh command format:

ssh username @ip address

ssh command renderings:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-P13Ki1tk-1583935218322) (imgs / ssh-1.png)]

Description:

  • You can install install ssh ssh client and server software on a single computer
  • In Ubuntu install ssh client command: sudo apt-get install openssh-client

Use 3. scp command

scp is based on the ssh command for remote file copy, that is required to ensure that the server and the client computer to install the appropriate software ssh, then you can put the code we write copy to a remote server.

scp command format:

  • Remote file copy
    • scp local file remote server remote server username @ ip address: Specifies the path to copy to a remote server
    • scp username @ remote server remote server ip address: The remote server specified file copied to the local computer path
  • Remote copy destination
    • scp -r local directory on the remote server username @ remote server ip address: Specifies the path to copy to a remote server
    • scp -r remote server username @ remote server ip address: directory specified remote server to the local computer to copy the path
    • -r recursively copy the entire directory represents

The remote server to the local file copy renderings:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-2rQDhuhD-1583935218323) (imgs / scp-1.png)]

The remote file server to the local copy renderings:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-ymFAJ1yJ-1583935218323) (imgs / scp-2.png)]

Local directory server to the remote copy renderings:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-vx4MPcyD-1583935218323) (imgs / scp-3.png)]

Directory of the remote server to the local copy renderings:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-GfZKL6Ho-1583935218324) (imgs / scp-4.png)]

4. FileZilla use software

FileZilla is a free open source FTP software, visual way to upload and download files. Can later be replaced by FileZilla scp command

FIG FileZilla use effect:
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

5. Summary

  • ssh remote login host computer command is equivalent to the direct operation of a remote computer.
  • scp command remote copy operation is complete, note: Copy the folder need to add the -r option.
  • A large number of file uploads and downloads can be done through visualization tools FileZilla.
Published 702 original articles · won praise 931 · views 120 000 +

Guess you like

Origin blog.csdn.net/qq_35456045/article/details/104807073