Wednesday, March 27, 2013

ssh config

#For Debian
-------------------------------
Port   22
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
ServerKeyBits   1024
LoginGraceTime   600
KeyRegenerationInterval   3600
PermitRootLogin no
IgnoreRhosts   yes
IgnoreUserKnownHosts   yes
StrictModes   yes
X11Forwarding   no
PrintMotd   yes
SyslogFacility   AUTH
LogLevel   INFO
RhostsRSAAuthentication  no
RSAAuthentication   yes
PasswordAuthentication   yes
PermitEmptyPasswords   no
AllowUsers sysadmin
Subsystem   sftp   /usr/libexec/openssh/sftp-server
-------------------------------

If set port not 22 like 2200
shell log in #ssh -l user -p 2200 ip address/hostname
--------------------------------------------------------------

#For Centos

Port   55001
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
ServerKeyBits   1024
LoginGraceTime   600
KeyRegenerationInterval   3600
PermitRootLogin no
IgnoreRhosts   yes
IgnoreUserKnownHosts   yes
StrictModes   yes
X11Forwarding   no
PrintMotd   yes
SyslogFacility   AUTH
LogLevel   INFO
RhostsRSAAuthentication  no
RSAAuthentication   yes
PasswordAuthentication   yes
PermitEmptyPasswords   no
AllowUsers sysadmin
Subsystem   sftp   /usr/libexec/openssh/sftp-server

No comments: