Ssh installation and use of scp commands

Source: Internet
Author: User
Tags scp file scp command secure copy

Ssh installation and scp command installation ssh cannot be used! [Root @ clear test] # yum install sshd * Loaded plugins: fastestmirror, refresh-packagekitLoading mirror speeds from cached hostfile * base: pai.bit.edu.cn * extras: ftp.cs.pu.edu.tw * updates: data. nicehosting. co. krSetting up Install ProcessNo package sshd * available. error: Nothing to do requires the following command! Yum install openssh-clients will prompt to install the following 4 installation packages: Updating: openssh-5.3p1-84.1.el6.x86_64 1/6 Installing: libedit-2.11-4.20080712cvs.1.el6.x86_64 2/6 Installing: openssh-clients-5.3p1-84.1.el6.x86_64 3/6 Updating: openssh-server-5.3p1-84.1.el6.x86_64 4/6 these four installation packages after installation can use ssh and scp command! Use of scp command! Scp is secure copy, which is used to copy remote files. data transmission uses ssh1 and uses the same authentication method as ssh1 to provide the same security guarantee. unlike rcp, scp requires you to enter the password if necessary. the simplest application is as follows: scp Local User Name @ IP Address: file name 1 remote user name @ IP Address: file name 2 [local user name @ IP Address:] can be left blank, you may need to enter the password corresponding to the remote user name. possible useful parameters:-v is the same as-v in most linux commands to display the progress. it can be used to view connections, authentication, or configuration errors. -C enable compression options. -P: select the port. note:-p has been used by rcp. -4 Use the IPV4 address forcibly. -6 Use IPV6 addresses forcibly. command for copying a single file: scp file username @ ip: filepath Description: file: name of the file to be copied username: Remote Login username, ip: Remote Server ip filepa Th: run the following command to copy a folder from a remote file path (add the-r parameter): scp-r file username @ ip: There are three common methods to copy files between Linux systems with different filepaths: the first is to install the ftp Server in one of the Linux systems, so that you can copy the file in another client program using ftp. The second method is to use the samba service, similar to the Windows file copy method, which is concise and convenient. 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/1.gif root@172.19.2.75:/home/root then will prompt you enter another 172.19.2.75 host root user login password, then start cp and ungzip if you want to reverse operation, copy the file from the remote host to the current system, also very simple: scp root@172.19.2.75:/home/abc.gif/home/root copy folder format is scp-r root@192.168.1.1: /home // local directory scp-p 123/etc/passwd root@192.168.1.71:/home/two linux servers if the scp command is used to transmit data, you must install the openssh-clients service package !! Only one installation can not be transmitted !!

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.