2009年3月20日 星期五

Debian - ssh

安裝openssh-server
# apt-get install openssh-server

檢查 process
ps aux | grep ssh

設定ssh_config

vi /etc/ssh/sshd_config

限制root 登入

PermitRootLogin no

修改登入port
# What ports, IPs and protocols we listen for
Port 22

限制IP登入

vi /etc/hosts.allow

加入
sshd:xxx.xxx.xxx.xxx :allow

拒絕其他IP

vi /etc/hosts.deny

加入
sshd:all:deny

沒有留言: