Skip to content

sysadmin global sshconfig 03102011

yannouk edited this page Jul 11, 2012 · 2 revisions

Table of Contents

Infos

Made by : olbat

Date: 03/10/2011

Currently applied on : papilusion

Comments

Installing private ssh keys on a server and remove the X11 forwarding from ssh config (useless).

Logs

Session

  • user : root
  • host : papilusion
  • date : 03/10/2011 09:31
  • curpath : /root

Commands

  • Add public keys to ssh authorized keys list
  • Edit /root/.ssh/authorized_keys, see [1]
  • Reconfigure the daemon
  • Edit /etc/ssh/sshd_config, see [2]
  • Reloading the daemon for the config to be apply (same as /etc/init.d/ssh reload)
 root@papilusion# service ssh reload

Files

  • [1] Edit /root/.ssh/authorized_keys
    • Add rsa public key for bedhed
    • Add rsa public key for olbat
  • [2] Edit /etc/ssh/sshd_config
 --- old	2011-10-03 09:45:45.000000000 +0200
 +++ new	2011-10-03 09:47:39.000000000 +0200
 @@ -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
 
@@ -86,2 +86,2 @@
 # and ChallengeResponseAuthentication to 'no'.
-UsePAM yes
+UsePAM no
Clone this wiki locally