Friday, January 4, 2013

How to SSH home without access to router

Do you need to access a Linux box that sits behind a router or modem, however you don't have admin access to configure port forwarding? Well, here's something that might help you.

Before we start, make sure that the remote client machine is able to connect to an IPv6 network (test here).

1- Register for a gogo6/freenet6 account -

2- Install gogoc on the remote server

$ sudo apt-get install gogoc

3- Edit the configuration file with your credentials and your closest broker (mine was

$ sudo vim /etc/gogoc/gogoc.conf


4- Start the gogoc service

$ sudo service gogoc stop
$ sudo service gogoc start

5- If you get the error "* Not starting gogoc - no server key", then follow steps 5a, b and c, otherwise go to step 6:

5a- Add your broker to the tsp-broker-list.txt 

$ cd /var/lib/gogoc/
$ sudo vim tsp-broker-list.txt 

# Add your broker as

5b- Start the server in the foreground so you get prompted to accept the key

$ sudo /usr/sbin/gogoc -n -f /etc/gogoc/gogoc.conf is an unknown host, do you want to add its key?? (Y/N) y

5c- Wait for about 30 seconds (to be sure), then stop the foregroud process (Ctrl+c) and start it in the background (step 4)

6- Check that an IPv6 address was assigned is running:

$ ifconfig | grep -q inet6 && echo ok

7- Try to connect from the remote client
- If connecting from Linux:

$ ssh -6 [linux_user]@[net6_user]

- If connecting from Windows:


Marty Ballard said...

So I failed on the first step, my machine cannot connect to IPv6. Is there a way to force this?

Victor said...

Hi Marty,

It really depends on your network and if you can configure it.

My work network does not have IPv6 enabled, so I cannot use this method. So when I'm at work I use Hamachi to connect to my desktop at home.