scp file with a specific port
I want to use scp to copy file from server A to server B , if I want the copying is via a specific port ( not use the default port ) , can advise what can i do ? thx
|
Use the -P switch followed by the port number you want to use.
Code:
man scp |
Quote:
when use scp -p file.mine -P 22040 hostname:/destination it pop -P: No such file or directory 22040: No such file or directory what is wrong ? thx |
You must put first the scp options and then the files you want to copy, so either one of the following will do:
Code:
scp -p -P 22040 file.mine hostname:/destination |
Quote:
if I want to use rcp instead of scp , can advise what can i do ? thx |
I'm not using rcp, but from the manpage I guess you need to use the -D option to specify a different port.
Code:
rcp -D 22040 file.mine hostname:/destination |
All times are GMT -5. The time now is 05:17 PM. |