-
Notifications
You must be signed in to change notification settings - Fork 2
Sysadmin grodoudou sshconfig users 07062012
Yannouk edited this page Jul 5, 2012
·
1 revision
- user : root
- host : ns225381.ovh.net
- date : 06/07/12 17:17
- curpath : /root
[email protected]# adduser bedhed [email protected]# mkdir -p ~bedhed/.ssh
- Edit /home/bedhed/.ssh/authorized_keys, see [1]
[email protected]# chown bedhed:bedhed ~bedhed/.ssh [email protected]# chown bedhed:bedhed ~bedhed/.ssh/authorized_keys [email protected]# adduser yannouk [email protected]# mkdir -p ~yannouk/.ssh
- Edit /home/yannouk/.ssh/authorized_keys, see [2]
[email protected]# chown yannouk:yannouk ~yannouk/.ssh [email protected]# chown yannouk:yannouk /home/yannouk/.ssh/authorized_keys [email protected]# adduser olbat [email protected]# mkdir -p ~olbat/.ssh
- Edit /home/olbat/.ssh/authorized_keys, see [3]
[email protected]# chown olbat:olbat ~olbat/.ssh [email protected]# chown olbat:olbat /home/olbat/.ssh/authorized_keys
- Edit /root/.ssh/authorized_keys2, see [4]
- Edit /etc/ssh/sshd_config, see [5]
- Define a password for root
[email protected]# passwd
- Edit /root/.ssh/authorized_keys2, see [11]
[email protected]# /etc/init.d/ssh restart
- [1] Edit /home/bedhed/.ssh/authorized_keys
- Add rsa public key for bedhed
- [2] Edit /home/yannouk/.ssh/authorized_keys
- Add rsa public key for yannouk
- [3] Edit /home/olbat/.ssh/authorized_keys
- Add rsa public key for olbat
- [4] Edit /root/.ssh/authorized_keys2
- Add rsa public key for bedhed
- Add rsa public key for olbat
- [5] Edit /etc/ssh/sshd_config
--- old 2012-06-07 17:47:55.000000000 +0200 +++ new 2012-06-07 18:17:00.000000000 +0200 @@ -5,2 +5,3 @@ Port 22 +Port 65422 # Use these options to restrict which interfaces/protocols sshd will bind to @@ -30,3 +30,3 @@ PubkeyAuthentication yes -#AuthorizedKeysFile %h/.ssh/authorized_keys +AuthorizedKeysFile %h/.ssh/authorized_keys @@ -61,3 +61,3 @@ -X11Forwarding yes +X11Forwarding no X11DisplayOffset 10 @@ -49,3 +49,3 @@ # Change to no to disable tunnelled clear text passwords -#PasswordAuthentication yes +PasswordAuthentication no @@ -85,2 +85,2 @@ # and ChallengeResponseAuthentication to 'no'. -UsePAM yes +UsePAM no
- [11] Edit /root/.ssh/authorized_keys2
- Remove rsa public key for yannouk
- Remove rsa public key for bedhed
- Remove rsa public key for olbat