Use SSH installation and SCP commands

Source: Internet
Author: User
Tags ftp client scp command ssh port

Use SSH installation and SCP commands

 

The SSH service is not installed in Ubuntu by default. You can run the following command:

 

Yblin @ yblin-desktop :~ $ SSH localhost

SSH: connect to host localhost port 22
: Connection refused

 

As shown above, SSH has not been installed.

Install the SDK using apt-Get as follows:

Yblin @ yblin-desktop :~ $ Sudo apt-Get install OpenSSH-Server

 

The default ssh port is 22. You can modify the default port through sudo/etc/init. d/ssh start.

SCP is based on SSH logon, so file copying cannot be performed without installing ssh.

Use of SCP reference (http://blog.csdn.net/dlxu/archive/2007/04/16/1566772.aspx ):

There are three common methods for copying files between different Linux systems. The first method is FTP, that is, installing FTP in one Linux
In this way, you can use another FTP client program to copy files. The second method is to use the samba service, similar to Windows file copy.
The third method is to use the SCP command to copy files.

 

SCP is a file copy with security and is used for SSH logon. For example, to copy the current file to another remote host, you can run the following command.

SCP
/
Home
/
Daisy
/
Full
.
Tar
.
GZ root @
172.19
.
2.75
:
/
Home
/
Root

Then, you will be prompted to enter the logon password of the root user of the other 172.19.2.75 host, and copy the password.

If you want to copy files from the remote host to the current system, it is also very easy.

SCP root @
172.19
.
2.75
:
/
Home
/
Root
/
Home
/
Daisy
/
Full
.
Tar
.
GZ

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.