Linux under SSH installation and SCP command using the detailed _linux shell

Source: Internet
Author: User
Tags file copy ftp client ssh scp command

The Ubuntu default does not have SSH service installed, which can be done with the following command:

Copy Code code as follows:

yblin@yblin-desktop:~$ ssh localhost
Ssh:connect to host localhost Port 22:connection refused

As indicated above, SSH is not installed.

Installed through the Apt-get is as follows:

Copy Code code as follows:

yblin@yblin-desktop:~$ sudo apt-get install Openssh-server

The SSH default port is 22, and you can modify the default port by Sudo/etc/init.d/ssh start.

SCP is based on SSH, so if you do not have SSH installed, you cannot make file copies.

About the use of the SCP Citation (http://blog.csdn.net/dlxu/archive/2007/04/16/1566772.aspx):

Different Linux copy files commonly used 3 methods, the first is FTP, that is, one of the Linux installation Ftpserver, this can be another use of FTP client program to file copy. The second approach is to use the Samba service, similar to the Windows file copy of the way to operate, more concise and convenient, the third is to use the SCP command for file replication.

The SCP is a security file copy, based on SSH login. Easy to operate, such as to the current one file copy to a remote other host, you can command the following.

Copy Code code as follows:

Scp/home/daisy/full.tar.gz Root@172.19.2.75:/home/root

You will then be prompted to enter the login password for the other 172.19.2.75 host's root user, and then copy it.

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

Copy Code code as follows:

SCP root@172.19.2.75:/home/root/home/daisy/full.tar.gz

Related Article

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.