Edit /etc/ssh/ssd_config
Change the listening port number
port 22
port 12345
Restart the ssh server:
sudo /etc/init.d/ssh restart
Access it, by
ssh -p xxxx user@192.16x.xxx.xxx
After making these changes, rsync may not work. Use the new port as:
rsync -vzP --port=1234 user@192.168.1.12:/home/user/work/m78/others_from_archive/*.ps ./
------------------------------
from http://forums.devshed.com/bsd-help-31/blocking-a-range-of-ip-s-in-hosts-deny-322368.html
the users allowed to login can be specified in
/etc/ssh/sshd_config
by adding,
# List of user names allowed to log in
AllowUsers sam kim bob mary pete
and
PermitRootLogin no
-----------------------------------------------------
Block specific ip addresses: Edit /etc/hosts.deny and add,
ALL: 64.40.110.235, 64.40.150.235
etc etc. No carriage returns allowed, though i presume line-feed is ok.
Ranges are possible: more reading required.
No comments:
Post a Comment