Posted By

choise on 06/24/10


Tagged

Bash server ssh


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

JimBarrows
NARKOZ


generate and login with SSH-Keys


 / Published in: Bash
 

  1. # goto ssh dir
  2. ~/.ssh
  3.  
  4.  
  5. # if not existing, first create folder
  6. mkdir ~/.ssh && chmod 700 ~./.ssh
  7.  
  8.  
  9. # Generate Keypair - Enter and password
  10. ssh-keygen -t dsa
  11.  
  12.  
  13. # export key to your server
  14. cat id_dsa.pub | ssh root@yourserver.com 'cat >>~/.ssh/authorized_keys'
  15.  
  16. # now you can login
  17. ssh root@yourserver.com

Report this snippet  

You need to login to post a comment.