7
votes
Accepted
How to get a persistent reverse SSH tunnel using autossh?
$ autossh -M 20000 -N -i /home/rspi/.ssh/id_rsa [email protected]
...
$ ssh rspi@localhost -p 20000
In this case, you're not using the ssh -R option to set up a reverse tunnel; you're specifying ...
4
votes
How to SSH between two servers behind firewalls (without a 3rd party server)
In order to allow an SSH connection from RPC-2 to LPC-1 you need to set up port forwarding on LR from an arbitrary port on the outside to the SSH port of LPC-1.
You can then connect with SSH from RPC-...
3
votes
Accepted
SSH remote forwarded port doesn't accept external connection (even with `GetewayPorts yes`)
The screenshot shows a file with text
This is the ssh client system-wide configuration file. See ssh_config(5) for more information.
It's ssh_config, client configuration file. GatewayPorts yes ...
2
votes
Accepted
How could a reverse SSH tunnel be instantiated remotely via the web?
Get out the bailing wire and duct tape, but this is what I've done in the past
On some web server out there, put a file.
On the server you want to start the connection, have it wget that file in a ...
2
votes
Accepted
How to host a local server using Heroku?
I started, back when i was a kid i think, looking for ways to host a Public server from Local server at NPM. Searched for keywords like:
Reverse proxy
Ws tunnel
Reverse HTTP
TCP tunnel
Tried ws-...
2
votes
Reverse ssh not working. ssh_exchange_identification: Connection closed by remote host
You need to have the sshd service started and listening on port 22 in the server A
2
votes
Accepted
Reverse proxy with ssh
Well, if you want to use ssh, you can
A) connect from A to B via ssh with port forwarding, if you have a ssh server on B, e.g.
user@A $ ssh -L 1122:C:1122 B
B) connect from B to A via ssh, with ...
2
votes
Accepted
How to use reverse ssh tunneling with multiple jump servers
You can actually accomplish this with a single SSH tunnel between the two Linux servers, more specifically from the one on Network A to the one on Network B (the direction in which it can SSH.)
...
2
votes
Accepted
How to remotely write to a file using multi-hop SSH
For each hop, you'll need a layer of quoting. Essentially, ssh server some command foo bar ends up running $SHELL with the arguments -c and some command foo bar, so:
The first layer of quotes is ...
1
vote
Accepted
Reverse tunneling for proxy
Proxies rarely work that way. ("Reverse proxy" means something different.)
VPNs, however, are always bidirectional as they carry independent packets rather than strict request/response pairs....
1
vote
Cannot connect to VNC through reverse ssh
I am still not sure why this was not working but switching to x11vnc instead of tigervnc seems to work now (also forwarding port 5900 instead of 5901 -- ssh -L 5900:localhost:5900 user@localhost -p ...
1
vote
Accepted
SSH reverse tunneling to a linux machine
Your SSH tunnel is correct, but when you run ssh on LPC1 as userLPC1 without specifying a userid, it connects to RPC2 over the tunnel but logs-in as userLPC1 i.e. the same userid as the system where ...
1
vote
Accepted
SSH dynamic port forwarding (SOCKS) from LAN (behind NAT) to another LAN (behind NAT); middle server with public IP address available
Please see how to create a SOCKS proxy with ssh. This is an excerpt from my answer there:
In general the situation without SOCKS proxy provided by ssh is like this:
A -> D
where A is a client (e....
1
vote
4G Reverse SSH tunnel through a port forwarded VPN?
The answer might not be relevant for your specific use case. But, if your problem is having access to a machine which is not physically accessible to you then read on.
I had a (potentially) similar ...
1
vote
Accepted
Unable to reach Plex using SSH reverse tunneling
I'm tunneling other ports to access other services (like a webserver) that are working fine.
If you simply need access to the web interface for Plex, (i.e. what you would get with ex. http://192.168....
1
vote
how to find which port reverse connection wants to connect?
When the client connects to the server, 4 pieces of information are sent with the initial request - the source and destination IP, but also the source and destination port.
Thus, if provided with ...
1
vote
Accepted
How to make port forwarding in initramfs stage?
The loopback interface may be down at initramfs host. Maybe all you need is
ifconfig lo up
(Inspired by this answer on Unix&Linux SE).
1
vote
Can I use other host instead of localhost for Destination Field in SSH Reverse Tunnel Port Forwarding?
Yes!
BUT you need to understand, that this other_host that you will be specifying is at the context of the LAN network of the ssh client. Because the ssh client and the ssh server could be in two ...
1
vote
Reverse tunnel, remote desktop session hangs when moving PuTTY window
The problem is manifested when the putty application is launched from the user's session, which is then connected via RDP. The problem can be bypassed if to launch putty from another user's session or ...
1
vote
Accepted
Reverse SSH connection at startup?
Startup scripts sometimes start running very early in the boot process
— sometimes before the network is established.
If these startup scripts try to access the network too early, they can fail.
...
1
vote
Accepted
How can a "dropped" but still connected reverse-SSH tunnel be picked up again?
More than a decade ago autossh utility was written for such purposes.
You can use the following connection script
#!/bin/sh
export AUTOSSH_GATETIME=0
autossh -M 0
-o "PubkeyAuthentication=yes" \
-...
1
vote
tunnel Linux through windows machine
I think a better solution would be to install Windows 7 on your new machine, and then install Virtualbox on that. Run CentOS as a guest in Virtualbox, and use NAT for netorking. All of the internet ...
1
vote
SSH & SOCKS inside an HTTPS encrypted tunnel using a Windows Apache Server or what?
SSH is already using SSL to encrypt the traffic. In order to use the (often) allowed HTTPS port tcp/443 to connect to your home SSH server, you would only need to configure both your SSH client and ...
1
vote
Accepted
Reverse tunnel to access external API on firewalled server accessible only via bastion
There is really cute drawing which explains RemoteForward in openssh. But the remote forwarding is probably more complicated in your use case than you describe.
You would need to change at least /etc/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
reverse-tunnel × 74ssh × 45
ssh-tunnel × 21
networking × 16
port-forwarding × 15
tunnel × 15
linux × 14
ubuntu × 6
remote-desktop × 6
putty × 5
nat × 4
reverse-proxy × 4
vpn × 3
proxy × 3
openvpn × 3
sshd × 3
windows-10 × 2
bash × 2
shell × 2
routing × 2
firewall × 2
raspberry-pi × 2
connection × 2
port × 2
windows × 1