Dec 8

[原]ssh使用说明 雨

linuxing , 17:59 , 网络服务 » 远程管理 , 评论(0) , 引用(0) , 阅读(39994) , Via 本站原创 | |

※转一份配置文件说明:
引用
#服务器端配置 /etc/ssh/sshd_config
#只考虑协议版本2
/etc/ssh/sshd_config
#全局配置
VersionAddendum TecZm-20050505 #在Telnet ip 22时只能看出openssh的版本,看不出OS
Protocol 2 #使用协议版本2
Port 22 #sshd监听22端口
ListenAddress 192.168.7.1 #sshd只监听目标ip为192.168.7.1的请求
AllowGroups wheel myguest #允许wheel组和myguest组的用户登录
AllowUsers teczm authen@192.168.8.5 #允许来自以上组的teczm用户和authen用户登录,
#且authen用户只能从主机192.168.8.5登录
#DenyGroups #拒绝登录的组,参数设置和AllowGroups一样
#DenyUsers #拒绝登录的用户,参数设置和AllowUsers一样
#AllowTcpForwarding yes #是否转发的TCP包都被允许。默认是 ``yes''。
LoginGraceTime 60 #60秒内客户端不能登录即登录超时,sshd切断连接。
KeyRegenerationInterval 1800 #1800秒(30分钟)后自动重新生成服务器的密匙。
MaxStartups 3 #设置同时发生的未验证的并发量,即同时可以有几个
UseDNS no #不使用DNS查询客户端。
PermitRootLogin no #不允许root登录,root可由wheel组用户登录后su。
X11Forwarding no #禁止用户运行远程主机上的X程序。
UseLogin yes #禁止X11Forwarding
#认证配置(口令认证、PAM认证、非对称密钥认证任选其一)
#口令认证
PubkeyAuthentication no #不使用非对称密钥认证
PasswordAuthentication yes #使用口令认证
PermitEmptyPasswords no #不允许使用空密码的用户登录
#PAM认证
PasswordAuthentication no #不使用口令认证
UsePAM #使用pam认证
ChallengeResponseAuthentication yes #允许挑战应答方式
#非对称密钥认证
PasswordAuthentication no #不使用口令认证
PubkeyAuthentication yes #使用非对称密钥认证
AuthorizedKeysFile .ssh/authorized_keys #用户认证使用的公钥。
内文分页: [1] [2]
Tags: ,
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]