How can I specify a port for the destination ip? When I do scp -p 0000
it still tries to connect on port 22, not the one I'm specifying.
scp svn_backup.tgz user@xxx.xxx.xx.xxx:/path/to/new/svn/
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityCapital "P".
$ scp -P 12345 svn_backup.tgz user@xxx.xxx.xx.xxx:/path/to/new/svn/
See $ man scp
for more details.
scp
was designed to imitate rcp
, and rcp used -p
to "preserve file times and modes". See man scp
.
– user1686
Jun 11 '10 at 19:08
It's also noteworthy that the port specification must come before the file name, i.e.:
scp svn_backup.tgz -P 12345 user@xxx.xxx.xx.xxx:/path/to/new/svn/
*won't work.
man scp
, for example. – motobói Mar 20 '12 at 11:47--help
orman
will probably give you the answer. – Ben Lessani - Sonassi Jun 22 '12 at 8:03