I run all of my ssh servers on a non-standard port. It helps me sleep better and I don't have to deal with logs full of failed access attempts on my ssh server (yes, I allow passwords... I know, that's dumb.) I set up ssh config on most of my machines to use the non-default port automatically:
host.com
PORT 666
That way I don't have to type in the port every time I ssh to a machine. This is great except when I'm on a machine where I can't edit the ssh_config. To specify the port manually you do something like this:
ssh -p 666 junk@host.com
scp -P 666 * junk@host.com:/tmp/.
but there isn't an obvious way to use rsync... you cannot simply do rsync -rvz --port=666 * junk@host.com:/tmp/. That doesn't work. It was fine for months until one day I simply had to have rsync while sitting at a machine that wasn't mine. Two minutes with google and I find this gem:
rsync -rvz --rsh='ssh -p666' * junk@host.com:/tmp/.
awesome.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment