I\'m trying to scp a file from a remote server to my local machine. Only port 80 is accessible.
I tried:
scp -p 80 username@www.myserver.com:/root/file.t
You know what's cooler than -P
? nothing
If you use this server more than a few times, setup/create a ~/.ssh/config
file with an entry like:
Host www.myserver.com
Port 80
or
Host myserver myserver80 short any.name.u.want yes_anything well-within-reason
HostName www.myserver.com
Port 80
User username
Then you can use:
scp username@www.myserver.com:/root/file.txt .
or
scp short:/root/file.txt .
You can use anything on the "Host" line with ssh, scp, rsync, git & more
There are MANY configuration option that you can use in config files, see:
man ssh_config