Non-default port transfer for SCP, SSH, Ssh-copy-id under Linux

Source: Internet
Author: User
Tags ssh remote command scp command

Under Linux system, SCP uses non-default port for transport need to add parameter-p (uppercase), SSH needs to add parameter-p (lowercase), ssh-copy-id need to add parameter-p (lowercase).

Instance:


In the SCP command. Uppercase is required. As follows:

[Email protected] data]# scp-p 28-r fina_info20120904.zip [email protected]:/home/huanliu/data


In the SSH remote command, it is lowercase. As follows:

[Email protected] dist]# ssh-p 28 58.213.14.170

[email protected] ' s password:

Last Login:tue Sep 4 18:23:41 from 114.249.230.69


In the Ssh-copy-id transfer key command, the following:

[Email protected] dist]# ssh-copy-id-i ~/.ssh/id_rsa.pub "-p 10022 [email protected]"


Non-default port transfer for SCP, SSH, Ssh-copy-id under Linux

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.