sshd設定

$ rpm -qa |grep ssh
      openssh-server-4.3p2-41.el5_5.1
       openssh-4.3p2-41.el5_5.1
       openssh-clients-4.3p2-41.el5_5.1
$ su -
      Password:

# find / -name 'sshd*'
      /usr/share/logwatch/scripts/services/sshd
       /usr/share/logwatch/scripts/services/sshd2
       /usr/share/logwatch/default.conf/services/sshd2.conf
       /usr/share/logwatch/default.conf/services/sshd.conf
       /usr/share/man/man8/sshd.8.gz
       /usr/share/man/man5/sshd_config.5.gz
       /usr/sbin/sshd
       /etc/pam.d/sshd
       /etc/rc.d/init.d/sshd
       /etc/ssh/sshd_config
       /var/empty/sshd
       /var/run/sshd.pid
       /var/lock/subsys/sshd

# cd /etc/ssh/

# ls -la
      total 176
       drwxr-xr-x  2 root root   4096 Sep 14 09:34 .
       drwxr-xr-x 83 root root   4096 Sep 16 07:53 ..
       -rw-------  1 root root 132839 Sep 13  2010 moduli
       -rw-r--r--  1 root root   1827 Sep 13  2010 ssh_config
       -rw-------  1 root root    668 Sep 14 09:07 ssh_host_dsa_key
       -rw-r--r--  1 root root    590 Sep 14 09:07 ssh_host_dsa_key.pub
       -rw-------  1 root root    963 Sep 14 09:07 ssh_host_key
       -rw-r--r--  1 root root    627 Sep 14 09:07 ssh_host_key.pub
       -rw-------  1 root root   1675 Sep 14 09:07 ssh_host_rsa_key
       -rw-r--r--  1 root root    382 Sep 14 09:07 ssh_host_rsa_key.pub
       -rw-------  1 root root   3323 Sep 13  2010 sshd_config
# ssh --version
      usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
                  [-D [bind_address:]port] [-e escape_char] [-F configfile]
                  [-i identity_file] [-L [bind_address:]port:host:hostport]
                  [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
                  [-R [bind_address:]port:host:hostport] [-S ctl_path]
                  [-w tunnel:tunnel] [user@]hostname [command]

# vi ssh_config

  #       $OpenBSD: ssh_config,v 1.21 2005/12/06 22:38:27 reyk Exp $
   
   # This is the ssh client system-wide configuration file.  See
   # ssh_config(5) for more information.  This file provides defaults for
   # users, and the values can be changed in per-user configuration files
   # or on the command line.
   
   # Configuration data is parsed as follows:
   #  1. command line options
   #  2. user-specific file
   #  3. system-wide file
   # Any configuration value is only changed the first time it is set.
   # Thus, host-specific definitions should be at the beginning of the
   # configuration file, and defaults at the end.
   
   # Site-wide defaults for some commonly used options.  For a comprehensive
   # list of available options, their meanings and defaults, please see the
   # ssh_config(5) man page.
   
   # Host *
   #   ForwardAgent no
   #   ForwardX11 no
   #   RhostsRSAAuthentication no
   #   RSAAuthentication yes
   #   PasswordAuthentication yes
   #   HostbasedAuthentication no
   #   BatchMode no
   #   CheckHostIP yes
   #   AddressFamily any
   #       $OpenBSD: ssh_config,v 1.21 2005/12/06 22:38:27 reyk Exp $
   
   # This is the ssh client system-wide configuration file.  See
   # ssh_config(5) for more information.  This file provides defaults for
   # users, and the values can be changed in per-user configuration files
   # or on the command line.
   
   # Configuration data is parsed as follows:
   #  1. command line options
   #  2. user-specific file
   #  3. system-wide file
   # Any configuration value is only changed the first time it is set.
   # Thus, host-specific definitions should be at the beginning of the
   # configuration file, and defaults at the end.
   
   # Site-wide defaults for some commonly used options.  For a comprehensive
   # list of available options, their meanings and defaults, please see the
   # ssh_config(5) man page.
   
   # Host *
   #   ForwardAgent no
   #   ForwardX11 no
   #   RhostsRSAAuthentication no
   #   RSAAuthentication yes
   #   PasswordAuthentication yes
   #   HostbasedAuthentication no
   #   BatchMode no
   #   CheckHostIP yes
   #   AddressFamily any
   #       $OpenBSD: ssh_config,v 1.21 2005/12/06 22:38:27 reyk Exp $
   
   # This is the ssh client system-wide configuration file.  See
   # ssh_config(5) for more information.  This file provides defaults for
   # users, and the values can be changed in per-user configuration files
   # or on the command line.
   #       $OpenBSD: ssh_config,v 1.21 2005/12/06 22:38:27 reyk Exp $
   
   # This is the ssh client system-wide configuration file.  See
   # ssh_config(5) for more information.  This file provides defaults for
   # users, and the values can be changed in per-user configuration files
   # or on the command line.
   
   # Configuration data is parsed as follows:
   #  1. command line options
   #  2. user-specific file
   #  3. system-wide file
   # Any configuration value is only changed the first time it is set.
   # Thus, host-specific definitions should be at the beginning of the
   # configuration file, and defaults at the end.
   
   #   RhostsRSAAuthentication no
   #   RSAAuthentication yes
   #   PasswordAuthentication yes
   #   HostbasedAuthentication no
   #   BatchMode no
   #   CheckHostIP yes
   #   AddressFamily any
   #   RSAAuthentication yes
   PasswordAuthentication yes
   #   HostbasedAuthentication no
   #   BatchMode no
   #   CheckHostIP yes
   #   AddressFamily any
   #   ConnectTimeout 0
   #   StrictHostKeyChecking ask
   #   IdentityFile ~/.ssh/identity
   #   IdentityFile ~/.ssh/id_rsa
   #   IdentityFile ~/.ssh/id_dsa
   Port 22
   Protocol 2,1
   #   Cipher 3des
   #   Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
   #   EscapeChar ~
   #   Tunnel no
   #   TunnelDevice any:any
   #   PermitLocalCommand no
   Host *
           GSSAPIAuthentication yes
   # If this option is set to yes then remote X11 clients will have full access
   # to the original X11 display. As virtually no X11 client supports the untrusted
   ssh_config 52L, 1815C written
   
   moduli      ssh_host_dsa_key      ssh_host_key      ssh_host_rsa_key      sshd_config
   ssh_config  ssh_host_dsa_key.pub  ssh_host_key.pub  ssh_host_rsa_key.pub



# /etc/rc.d/init.d/sshd restart
      Stopping sshd:                                             [  OK  ]
       Starting sshd:                                             [  OK  ]



  • 最終更新:2012-02-25 22:20:09

このWIKIを編集するにはパスワード入力が必要です

認証パスワード