SSH

From pressy's brainbackup
Jump to: navigation, search

SSH

SSH Login without password using keys. On node 1 and 2:

# ssh-keygen -t rsa		-> nophrase==nopassword
# $HOME/.ssh/id_rsa.pub 	-> cp id_rsa.pub `uname -n`-id_rsa.pub
# scp vizeversa $HOME/.ssh/id_rsa.pub $HOME/.ssh/<node>
# cat <node>_id_rsa.pub >> $HOME/.ssh/authorized_keys


Jump over Host

If you want or need a jump host but want to connect directly from your box, you can forward in/out put over a secure channel:

# ssh -t -o ProxyCommand='ssh user@jumphost -W %h:%p %r' user@target

My example jumps to the private target VM over a public VM in my Oracle Cloud (OCI)

pressy@PRESSY-MBP:~ # ssh -t -o ProxyCommand='ssh opc@130.61.92.197 -W %h:%p %r' opc@10.0.1.2