Monday 18 March 2019

passwordless cluster




#local
key=secret
user=wasit
host=1.2.3.4
ssh-keygen -t rsa -b 4096 -f $HOME/.ssh/$key
ssh-copy-id -i $HOME/.ssh/$key.pub $user@$host
#enter password many times :)
ssh -t -i $HOME/.ssh/$key $user@$host 'sudo su root'
#wasit's host server
ssh localhost
cp home/wasit/.ssh/authorized_keys /root/.ssh