LX-SVS-INFO-sshd
Updated 9/13/10 13:57
ssh staat voor secure shell. Er wordt gebruik gemaakt van ssl (secure sockets layer) om een shell op te starten, vaak op een andere computer, en de informatie van en naar die shell te versleutelen. Anders gezegd, betekent dit dat je met ssh een beveiligde remote terminal-sessie kunt starten (net zoals met telnet)
ssh is een client-server toepassing onder TCP-IP. Dit hoofdstuk gaat over het servergedeelte. De ssh-server heet sshd, dat is een afkorting van secure shell daemon.
Onder debian is de ssh-daemon standaard niet geïnstalleerd, en bijgevolg niet actief. (bij veel distributies zoals RedHat en CentOS is dat wel zo). Om sshd te installeren tik je het volgende in:
# apt-get install openssh-server
Reading package lists... Done
Building dependency tree... Done
Suggested packages:
ssh-askpass rssh molly-guard
The following NEW packages will be installed:
openssh-server
0 upgraded, 1 newly installed, 0 to remove and 142 not upgraded.
Need to get 0B/222kB of archives.
After unpacking 569kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 71618 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a4.3p2-9_i386.deb) ...
Setting up openssh-server (4.3p2-9) ...
Restarting OpenBSD Secure Shell server: sshd.
# Package generated configuration file # See the sshd(8) manpage for details # What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768 # Logging SyslogFacility AUTH LogLevel INFO # Authentication: LoginGraceTime 120 PermitRootLogin yes StrictModes yes RSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile %h/.ssh/authorized_keys # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes # To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no # Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication no # Change to no to disable tunnelled clear text passwords #PasswordAuthentication yes # Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes # GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yes X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no #MaxStartups 10:30:60 #Banner /etc/issue.net # Allow client to pass locale environment variables AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server UsePAM yes GatewayPorts no AllowTcpForwarding yes KeepAlive yes ListenAddress 172.16.21.101 |