(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
<metadesc>How to SSH without password to server</metadesc>
 
The basis of this is that your ID must be in the list of authorized hosts in the server. So, for password-less login to work, generate your public key, and append it to the authorized_hosts file in the server.
 
The basis of this is that your ID must be in the list of authorized hosts in the server. So, for password-less login to work, generate your public key, and append it to the authorized_hosts file in the server.
 
<div class="like-box" data-href="http://www.facebook.com/FacebookDevelopers" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
 
<div class="like-box" data-href="http://www.facebook.com/FacebookDevelopers" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
Line 4: Line 5:
 
  ssh-keygen -t rsa
 
  ssh-keygen -t rsa
 
*To copy to authorized_hosts file do
 
*To copy to authorized_hosts file do
  cat ~/.ssh/id_rsa.pub | ssh serveruser@server 'cat >> ~/.ssh/authorized_keys'
+
  cat ~/.ssh/id_rsa.pub | ssh serveruser@server 'cat >> ~/.ssh/authorized_keys'  
  
 
Test by  
 
Test by  
Line 13: Line 14:
 
You can also do the following command to copy the key
 
You can also do the following command to copy the key
 
  ssh-copy-id serveruser@server  
 
  ssh-copy-id serveruser@server  
 +
 +
 +
 +
 +
{{Template:FB}}
  
  
Line 18: Line 24:
 
<disqus/>
 
<disqus/>
  
 
<div class="fb-share-button" data-href="http://developers.facebook.com/docs/plugins/" data-type="button_count"></div> <div class="fb-send" data-href="http://developers.facebook.com/docs/plugins/" data-colorscheme="light"></div>
 
<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
 
 
 
[[Category:Technical]]
 
[[Category:Technical]]

Latest revision as of 12:58, 15 December 2013

The basis of this is that your ID must be in the list of authorized hosts in the server. So, for password-less login to work, generate your public key, and append it to the authorized_hosts file in the server.

  • To create a public key, from terminal do
ssh-keygen -t rsa
  • To copy to authorized_hosts file do
cat ~/.ssh/id_rsa.pub | ssh serveruser@server 'cat >> ~/.ssh/authorized_keys' 

Test by

ssh serveruser@server

If no password is asked, everything worked fine.

You can also do the following command to copy the key

ssh-copy-id serveruser@server 






blog comments powered by Disqus

The basis of this is that your ID must be in the list of authorized hosts in the server. So, for password-less login to work, generate your public key, and append it to the authorized_hosts file in the server.

ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub | ssh serveruser@server 'cat >> ~/.ssh/authorized_keys'

Test by

ssh serveruser@server

If no password is asked, everything worked fine.

You can also do the following command to copy the key

ssh-copy-id serveruser@server 


blog comments powered by Disqus