Difference between revisions of "Configure SSH"
From Organic Design wiki
(Set up key-based login and other important security settings for SSH access) |
(Change source-code blocks to standard format) |
||
Line 6: | Line 6: | ||
To set up key-based login, first create a pub/private key combo: | To set up key-based login, first create a pub/private key combo: | ||
− | + | <source> | |
+ | ssh-keygen -t rsa | ||
+ | </source> | ||
That will create the files (id_rsa and id_rsa.pub) in your ''~/.ssh'' folder. You then copy the pub one to a file called | That will create the files (id_rsa and id_rsa.pub) in your ''~/.ssh'' folder. You then copy the pub one to a file called |
Revision as of 18:11, 22 May 2015
Configure SSH Organic Design procedure |
To set up key-based login, first create a pub/private key combo:
ssh-keygen -t rsa
That will create the files (id_rsa and id_rsa.pub) in your ~/.ssh folder. You then copy the pub one to a file called authorized_keys in your ~/.ssh folder in any machines you want to log in to without using password.
You may need to adjust your /etc/ssh/sshd_config to allow it by setting RSAAuthentication and PubkeyAuthentication to yes and also check that the file it expects the pub key to be in is indeed ~/.ssh/authorized_keys in the AuthorizedKeysFile setting.
You can also prevent password login if you like as key-based login is stronger, just set the PasswordAuthentication setting to no.