# sudo aptitude install openssh-server
# sudo vi /etc/ssh/sshd_config
(can change the porth there too)
Protocol 2
…
PermitRootLogin no
…
AllowUsers jane
AllowUsers john
…
PermitRootLogin no
…
AllowUsers jane
AllowUsers john
# sudo /etc/init.d/ssh restart
Sometimes you may need to limit which hosts can contact the SSH server. Restrictions can be implemented by using the /etc/hosts.allow and /etc/hosts.deny files. The next allows connections only from trusted networks.
# sudo gedit /etc/hosts.allow
# Allow SSH from my own networks
sshd : localhost
sshd : 10. 192.168.
sshd : .mydomain.com .mydomain.net
# sudo gedit /etc/hosts.deny
# Deny everything by default
ALL : ALL : severity auth.info