Nano
September 12th, 2006, 02:57 PM
This guide is mainly thought for people who have a computer home and want to controll it from their office, passing through the company firewall restrictions using ssh.
Usually certain ports are always open, such 80, 443 and 21, so we will use one of this to connect home.
First of all, make sure you have the ssh server installed on your computer at home:
sudo apt-get install ssh
and once it's installed we'll make it listen the right port
sudo vi /etc/ssh/sshd_config
look for the line
Port 22
and change it to
Port 443
*The port 443 is generally used by https, which is, in basic words, the encrypted web browser flow.
Let's restart it sshd:
sudo /etc/init.d/ssh restart
and check if it works properly:
ssh your_user_name@127.0.0.1 -p 443
Good!
Now, next problem comes up since most ISP give you dynamic IPs and you don't know what's your home's ip.
To solve this we'll use ddclient.
First go to www.dyndns.com, create an account and read their HOWTO to create a host name: https://www.dyndns.com/services/dns/dyndns/howto.html
Once it's done we'll work on ddclient, the dyndns client software.
sudo apt-get install ddclient
then let's edit the configuration file
sudo vi /etc/ddclient.conf
and make it look like this:
pid=/var/run/ddclient.pid
protocol=dyndns2
use=web
server=members.dyndns.org
login=your_username
password='your_password'
your_hostname.your_domain.com
Once it's edited let's restart it:
sudo /etc/init.d/ddclient restart
and check if it works with:
dig your_hostname.your_domain.com
Now check if the ip matches yours.
Now, install firestarter and allow TCP connections to port 443. I won't describe this point because most users know about it.
Don't forget to forward the 443 traffic from your router to the computer you want to control. If you're connected using a USB modem you don't need do to it.
Now, when you're at office simply download Putty, which is a windows ssh client or use the terminal in MacOSx or Linux to connect home.
To connect just type:
ssh your_username@your_hostname.your_domain.com -p 443
or from Putty fill the connection form and you'll be in.
I mainly use this to control mldonkey from my office.
If some point isn't clear enough I'll be glad to explain it in details.
Usually certain ports are always open, such 80, 443 and 21, so we will use one of this to connect home.
First of all, make sure you have the ssh server installed on your computer at home:
sudo apt-get install ssh
and once it's installed we'll make it listen the right port
sudo vi /etc/ssh/sshd_config
look for the line
Port 22
and change it to
Port 443
*The port 443 is generally used by https, which is, in basic words, the encrypted web browser flow.
Let's restart it sshd:
sudo /etc/init.d/ssh restart
and check if it works properly:
ssh your_user_name@127.0.0.1 -p 443
Good!
Now, next problem comes up since most ISP give you dynamic IPs and you don't know what's your home's ip.
To solve this we'll use ddclient.
First go to www.dyndns.com, create an account and read their HOWTO to create a host name: https://www.dyndns.com/services/dns/dyndns/howto.html
Once it's done we'll work on ddclient, the dyndns client software.
sudo apt-get install ddclient
then let's edit the configuration file
sudo vi /etc/ddclient.conf
and make it look like this:
pid=/var/run/ddclient.pid
protocol=dyndns2
use=web
server=members.dyndns.org
login=your_username
password='your_password'
your_hostname.your_domain.com
Once it's edited let's restart it:
sudo /etc/init.d/ddclient restart
and check if it works with:
dig your_hostname.your_domain.com
Now check if the ip matches yours.
Now, install firestarter and allow TCP connections to port 443. I won't describe this point because most users know about it.
Don't forget to forward the 443 traffic from your router to the computer you want to control. If you're connected using a USB modem you don't need do to it.
Now, when you're at office simply download Putty, which is a windows ssh client or use the terminal in MacOSx or Linux to connect home.
To connect just type:
ssh your_username@your_hostname.your_domain.com -p 443
or from Putty fill the connection form and you'll be in.
I mainly use this to control mldonkey from my office.
If some point isn't clear enough I'll be glad to explain it in details.