Thursday, March 12, 2015

SSH to tondu as omnitest without password

  • As gallinar, in .ssh/config, comment “Batchmode yes” so as to temporarily get a password question when sshing:
 #BatchMode yes
  • As gallinar, in .ssh/config, add the following lines in order to log to tondu as omnitest:
 Host tndu
 HostName tondu
 User omnitest
  • As gallinar, if not already done, generate a public key:
 ssh-keygen -t rsa
  • As gallinar, copy the public key to the target:
 scp ~/.ssh/id_rsa.pub tondu:/tmp
  • As omnitest, on tondu:
 cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys
  • As gallinar, in .ssh/config, uncomment “Batchmode yes”, and remove /tmp/id_rsa.pub on tondu.