SSH
January 20, 2014 — 0:42

Author: silver  Category: bsd linux  Comments: Off

SSH:

No host checking:

ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $1

No public key, use passwd

ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no

Tar/untar between hosts:


Multi hop tunnel:

ssh -A -t host1 \
-L 4648:localhost:4648 \
ssh -A -t host2 \
-L 4648:localhost:4648
ssh -A -t host3 \
-L 4648:localhost:4648

SSH Agent:

$ exec ssh-agent /bin/bash
$ ssh-add

-or-

eval `keychain --eval`

http://www.funtoo.org/Keychain

List fingerprints:

ssh-keygen -lf id_rsa

All keys in .ssh/authorized_keys:


Check priv/pub key:

ssh-keygen -y -f id_rsa

Change key passwd:

ssh-keygen -f id_rsa -p