Skip to main content
replaced http://serverfault.com/ with https://serverfault.com/
Source Link

Connecting to your server.

You will need to use your public ip or use a dynamic dns service such as http://freedns.afraid.org/

You will need to set up port forwarding on your router.

From what I understand you have a cable connecting your laptop (linux) to your server (linux). If you can access the internet I am going to assume that you already set up your laptop to forward packages. If this is how you are doing it you will also need to tell your laptop to do port forwarding to the server.

-> internet -> router -> laptop -> server

You can do this with iptables.
http://serverfault.com/questions/140622/how-can-i-port-forward-with-iptableshttps://serverfault.com/questions/140622/how-can-i-port-forward-with-iptables

Because you need the laptop on and connected to the server I would like to recommend that you forward port 22 to your laptop and use it as a jumpbox to your server.

Another idea would be to make an ssh tunnel from the laptop to the server. In this case you would pick a port. For example port 2222 and do the following

ssh -f user@serverip -L 2222:serverIP:22 -N

-f sends the command to the background
-L localport:serverip:port
-N does not run any commands after you log in

After you run the command you will be able to ssh to the laptop on port 2222 but you would actually be going to the server.

Connecting to your server.

You will need to use your public ip or use a dynamic dns service such as http://freedns.afraid.org/

You will need to set up port forwarding on your router.

From what I understand you have a cable connecting your laptop (linux) to your server (linux). If you can access the internet I am going to assume that you already set up your laptop to forward packages. If this is how you are doing it you will also need to tell your laptop to do port forwarding to the server.

-> internet -> router -> laptop -> server

You can do this with iptables.
http://serverfault.com/questions/140622/how-can-i-port-forward-with-iptables

Because you need the laptop on and connected to the server I would like to recommend that you forward port 22 to your laptop and use it as a jumpbox to your server.

Another idea would be to make an ssh tunnel from the laptop to the server. In this case you would pick a port. For example port 2222 and do the following

ssh -f user@serverip -L 2222:serverIP:22 -N

-f sends the command to the background
-L localport:serverip:port
-N does not run any commands after you log in

After you run the command you will be able to ssh to the laptop on port 2222 but you would actually be going to the server.

Connecting to your server.

You will need to use your public ip or use a dynamic dns service such as http://freedns.afraid.org/

You will need to set up port forwarding on your router.

From what I understand you have a cable connecting your laptop (linux) to your server (linux). If you can access the internet I am going to assume that you already set up your laptop to forward packages. If this is how you are doing it you will also need to tell your laptop to do port forwarding to the server.

-> internet -> router -> laptop -> server

You can do this with iptables.
https://serverfault.com/questions/140622/how-can-i-port-forward-with-iptables

Because you need the laptop on and connected to the server I would like to recommend that you forward port 22 to your laptop and use it as a jumpbox to your server.

Another idea would be to make an ssh tunnel from the laptop to the server. In this case you would pick a port. For example port 2222 and do the following

ssh -f user@serverip -L 2222:serverIP:22 -N

-f sends the command to the background
-L localport:serverip:port
-N does not run any commands after you log in

After you run the command you will be able to ssh to the laptop on port 2222 but you would actually be going to the server.

Source Link

Connecting to your server.

You will need to use your public ip or use a dynamic dns service such as http://freedns.afraid.org/

You will need to set up port forwarding on your router.

From what I understand you have a cable connecting your laptop (linux) to your server (linux). If you can access the internet I am going to assume that you already set up your laptop to forward packages. If this is how you are doing it you will also need to tell your laptop to do port forwarding to the server.

-> internet -> router -> laptop -> server

You can do this with iptables.
http://serverfault.com/questions/140622/how-can-i-port-forward-with-iptables

Because you need the laptop on and connected to the server I would like to recommend that you forward port 22 to your laptop and use it as a jumpbox to your server.

Another idea would be to make an ssh tunnel from the laptop to the server. In this case you would pick a port. For example port 2222 and do the following

ssh -f user@serverip -L 2222:serverIP:22 -N

-f sends the command to the background
-L localport:serverip:port
-N does not run any commands after you log in

After you run the command you will be able to ssh to the laptop on port 2222 but you would actually be going to the server.