Ben Asked: 2010-06-12 07:51:30 +0800 CST2010-06-12 07:51:30 +0800 CST 2010-06-12 07:51:30 +0800 CST Linux SCP defining destination port 772 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/ linux scp 2 Answers Voted Best Answer EEAA 2010-06-12T07:55:40+08:002010-06-12T07:55:40+08:00 Capital "P". $ scp -P 12345 svn_backup.tgz user@xxx.xxx.xx.xxx:/path/to/new/svn/ See $ man scp for more details. stafusa 2012-03-20T07:42:57+08:002012-03-20T07:42:57+08:00 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.
Capital "P".
See
$ man scp
for more details.It's also noteworthy that the port specification must come before the file name, i.e.:
*won't work.