1

I'd like to SSH into my desktop, from my laptop. My desktop is connected to the internet via my university's WiFi. So, it's on a network that I have no control over and its IP changes regularly.

After some brief research, it seems that with the help of the server that I rent (which I have complete control over), this is possible by either:

a) SSH Tunneling or b) Setting up a VPN

So, here's the situation:

Laptop <--SSH--> Server <--SSH--> Desktop

Here's what I want:

Laptop <---SSH---> Desktop (via the server as an intermediate)

Can anyone advise me on the easiest way to achieve this and/or link relevant resources?

If my desktop isn't connected to the server, is it possible to "ping" my desktop to initiate that connection from my laptop?

Thanks!

closed as off-topic by roaima, user88036, GAD3R, RalfFriedl, Thomas Sep 27 '18 at 17:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – roaima, Community, GAD3R, RalfFriedl, Thomas
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I assume that you don't have access to your university's router as well, if so then your server will be behind a NAT, if so, please inform – Yousef Al-Hadhrami Sep 26 '18 at 21:51
  • 1
    I'm curious if your university has a network policy that speaks to accessing university resources from outside of the network? – Jeff Schaller Sep 26 '18 at 22:25
1

There are services to help you achieve this, one called noIp and another called ngrok which are examples that offer a fixed domain for a dynamic IP, it basically gives you a domain, and each time your IP changes it updates that. So to start,

make sure that the desktop(your server) you want to access has ssh_d service on a PORT (any port > 1024 is fine)

forward the PORT to the router (note often routers use NAT between local connection and the Internet)

connect to your server from another network using ssh -p PORT user@the-domain.example

  • updating the answer with a comment, there is another thing similar to noIP ngrok.com which is free – Yousef Al-Hadhrami Oct 10 '18 at 15:50
0

Managed to do it with a reverse SSH tunnel. See here: https://www.vdomck.org/2005/11/reversing-ssh-connection.html

Not the answer you're looking for? Browse other questions tagged or ask your own question.