Skip to main content
27 events
when toggle format what by license comment
Oct 7, 2023 at 6:06 comment added Steven Lu I'm leaving a note to go alongside my downvote. It's nothing against you, dear author, it's just that your explanation unfortunately didn't help me to understand, and your diagrams are far inferior to the diagrams from the other answer. The only thing about the other answer that helped me to understand any better were the diagrams. This functionality is inherently nearly impossible to explain without decent diagrams. So it goes. I downvoted this answer in order to make it easier for the other answer to rise up in the page.
Feb 22, 2023 at 13:23 history edited ghoti CC BY-SA 4.0
MOAR clarification of terms and endpoints
Feb 22, 2023 at 13:18 history edited ghoti CC BY-SA 4.0
MOAR clarification of terms and endpoints
Jan 31, 2023 at 11:47 history edited ghoti CC BY-SA 4.0
modernize and reword a little, add ProxyCommand at the end
Aug 26, 2021 at 13:51 comment added ghoti @lashgar .. answering just the question may get you a checkmark and a few upvotes, but for an answer to stand out, it needs to appeal to many, and educate beyond merely the scope of the question. If you'd like to add your answer to the list and see how it fares, there's nothing stopping you! :)
Aug 25, 2021 at 19:46 comment added lashgar "The -L option tells the tunnel to answer on the local side of the tunnel (the host running your client). The -R option tells the tunnel to answer on the remote side (the SSH server)." That's all needed for answer.
Jul 3, 2021 at 23:37 comment added cregox i've got all id_rsa in place, and regular passwordless ssh works fine. but when connecting through the localhost tunnel, it always ask for a password. any idea what might be happening?
Oct 22, 2020 at 16:54 comment added ghoti @HamedH .. There's some documentation on ssh session (and tunnel) control here.
Oct 21, 2020 at 20:15 comment added HamedH if I start ssh with -f how can I easily stop that tunnel later?
Feb 14, 2020 at 17:25 history edited ghoti CC BY-SA 4.0
update See Also
S Jul 27, 2018 at 13:41 history edited ghoti CC BY-SA 4.0
Added a reference to a "Bind to other IPs than localhost"-post on superuser.com.
S Jul 27, 2018 at 13:41 history suggested CommunityBot CC BY-SA 4.0
Added a reference to the "Bind to other IPs than localhost"-post.
Jul 26, 2018 at 23:24 review Suggested edits
S Jul 27, 2018 at 13:41
Jul 19, 2018 at 15:23 comment added ghoti @yildizabdullah, you'll need a common location external to both NATted sites for one site to establish a public place for the other to access, in order to connect two tunnels. But your best bet is probably to get your network admins on-side, and have them punch a hole for you in one firewall or the other.
Apr 5, 2018 at 18:15 comment added yildizabdullah What should I do if both machines are behind NAT?
Mar 30, 2018 at 19:59 comment added Asclepius Usage of localhost and username@localhost is ambiguous. It's unclear if localhost is always meant literally or not, and if not, then what exactly it means. It's also unclear what username means.
Jan 10, 2018 at 16:32 comment added yukashima huksay I'm getting ssh_exchange_identification: Connection closed by remote host on one side
Mar 8, 2017 at 19:16 comment added ghoti @Calmarius, a client initiates a connection, a server receives that connection. A tunnel is a product of an SSH connection. Make a tunnel with -R, and you provide something through which some other client (on the remote side from the perspective of the SSH client) might establish a connection to a server that is "local" to the SSH client. You're right that things are relative; terminology is necessarily dependent on perspective and scope. It becomes easier the more you work with it.
Nov 12, 2016 at 15:12 comment added Calmarius @ghoti It's indeed confusing, because local and remote machines are relative. When I sit at the workplace my home computer is the remote, when I sit at home, the workplace computer is remote. Server and client is also confusing when speaking of tunneling. For example If I connect to home from work with ssh -R. I connect to my work from the home computer by connecting localhost. So from sockets perspective the server is home computer itself. But logically I connected to my work computer. That's confusing.
Sep 18, 2015 at 16:44 comment added ghoti @Rucent88, I'm not sure what reduction would be possible. A client establishes a connection to a server. That's common terminology all across the world of networking. Local and remote machines seem pretty self evident. If you're confused about SSH or general unix terminology after reading the documentation, I'm sure you'll have no trouble finding people here very willing to answer any questions you may have.
Sep 18, 2015 at 16:21 comment added Rucent88 I'm having a very difficult time following this explanation due to the loose usage of terms: server, client, local machine, remote machine, host, yourpublichost, localhost, remotehostname. With all these loose and undefined terms, it could be assumed that someone would need as much as 8 computers to set this up. I state this because in all other aspects it seems a very good explanation. Please reduce and define terms.
Jan 29, 2014 at 16:45 comment added ghoti SOCKS proxies are not the same as tunnels. If you have a question about how to use them, please ask it.
Jan 29, 2014 at 12:38 comment added BigSack what about ssh -D . Please explain using same method.
Nov 25, 2012 at 2:40 history edited ghoti CC BY-SA 3.0
formatting
Nov 24, 2012 at 17:51 vote accept Ali
Sep 13, 2012 at 22:03 review First posts
Sep 14, 2012 at 22:17
Aug 24, 2012 at 17:56 history answered ghoti CC BY-SA 3.0