View previous topic :: View next topic |
Author |
Message |
Negated Void l33t
Joined: 25 Dec 2002 Posts: 672
|
Posted: Wed Nov 07, 2007 8:09 am Post subject: Is there any kind of passive or reverse ssh? |
|
|
Hey,
Is there any kind of passive or reverse ssh where the computer I want to ssh can connect to me and give me access? So like if I want to connect to a friend's computer to diagnose something, but his firewall can't be setup to allow incoming ssh - can he connect to me somehow and allow me access?
Thanks! |
|
Back to top |
|
|
di1bert l33t
Joined: 16 May 2002 Posts: 963 Location: Oslo, Norway
|
Posted: Wed Nov 07, 2007 8:18 am Post subject: |
|
|
I've tried unsuccessfully to do this with Netcat previously, but I haven't tried in a while.
A quick Google came up with this
which looks like it might be a winner...
HTH
-m |
|
Back to top |
|
|
tarpman Veteran
Joined: 04 Nov 2004 Posts: 1083 Location: Victoria, BC, Canada
|
Posted: Wed Nov 07, 2007 2:42 pm Post subject: |
|
|
Yes, use reverse forwarding.
man 1 ssh wrote: | -R [bind_address:]port:host:hostport
Specifies that the given port on the remote (server) host is to
be forwarded to the given host and port on the local side. This
works by allocating a socket to listen to port on the remote
side, and whenever a connection is made to this port, the connec-
tion is forwarded over the secure channel, and a connection is
made to host port hostport from the local machine.
Port forwardings can also be specified in the configuration file.
Privileged ports can be forwarded only when logging in as root on
the remote machine. IPv6 addresses can be specified by enclosing
the address in square braces or using an alternative syntax:
[bind_address/]host/port/hostport.
By default, the listening socket on the server will be bound to
the loopback interface only. This may be overriden by specifying
a bind_address. An empty bind_address, or the address `*', indi-
cates that the remote socket should listen on all interfaces.
Specifying a remote bind_address will only succeed if the
server's GatewayPorts option is enabled (see sshd_config(5)). |
_________________ Saving the world, one kilobyte at a time. |
|
Back to top |
|
|
SiberianSniper Guru
Joined: 06 Apr 2006 Posts: 381 Location: Dayton, OH, USA
|
Posted: Wed Nov 07, 2007 3:09 pm Post subject: |
|
|
Reverse ssh tunnels work great; I use them all the time to get around the dorm firewalls. di1bert's link pretty much explains it perfectly. Just make sure his computer is set up to allow incoming ssh even though it's behind a firewall - this was a source of frustration a couple times for me... |
|
Back to top |
|
|
|