Tuesday, February 24, 2009

Configuring SSH for behind a firewall

My brother couldn't get connected to his websites in Fetch on his Mac and we figured out that the library he was at was blocking most ports except the most common ones. His VPS only allows connections via SSH/SCP/SFTP or HTTP. In the end, I configured sshd on his VPS to listen to port 21 (the standard FTP port) as well as port 22. Since FTP isn't running on his VPS, this worked fine. Then he configured Fetch to connect on port 21 and all was good.

To configure sshd on his VPS, I edited /etc/ssh/sshd_config and added the following lines:
Port 22
Port 21
Then I restarted sshd:
service sshd restart
That's all there was to it!

No comments:

 

Labels

Labels