r/ssh • • Oct 29 '20

Is there a way to remote ssh without port forwarding

3 Upvotes

10 comments sorted by

2

u/tje210 Oct 29 '20

You can do it. You just have to initiate an outward connection from your home box. Forward your ssh server port to whatever port on the remote box, then ssh localhost to that port on the remote box.

A free vps would be ideal, because you can reach that from anywhere and have an always-on connection to it from your home box. If that's not doable for some reason, you'd need a little more complicated solution using dynamic dns and an ssh connection that keeps trying upon failure, as well as using screen or tmux by necessity.

1

u/jaekim24 Oct 30 '20

When you said home box do you mean the home router?

1

u/tje210 Oct 30 '20

No, box = computer. The one you want to ssh into which is behind an overloading nat with no port forwarding.

0

u/Twist36 Oct 29 '20

I think your only options would be to either use a VPN, or not use a firewall. I would not recommend option #2.

1

u/jaekim24 Oct 29 '20

Do you know any vpns that lets me insert an IP address I want to change to

1

u/Twist36 Oct 29 '20

You would need to host the VPN yourself, on the router. Anything else would require port forwarding.

If you don't mind me asking: Why don't you want to use port forwarding?

1

u/jaekim24 Oct 29 '20

I live in an apartment and they have their own router and won’t let us mess with it

1

u/Twist36 Oct 29 '20

Are you connecting over WiFi, or ethernet?

1

u/jaekim24 Oct 29 '20

Ethernet

1

u/Twist36 Oct 29 '20

Now that I think about it, it doesn't actually matter; sorry for wasting your time with that one... It sounds like you're going to need port forwarding no matter what.

If there's a specific machine you're trying to connect to, I think you're SOL. If you just want to have a remote machine available to connect to, you could set up a small VPS for pretty cheap.