Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jun 152010
 

Specify a port with the scp command

Answer:

If you want to use scp to copy file to remote machine, but that ssh server is listening at port other than 22, you can use the following command syntax.

# scp -P 6000 test.txt [email protected]:/home/john/

Please notes it is -P, not -p.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>