Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is there any kind of passive or reverse ssh?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Negated Void
l33t
l33t


Joined: 25 Dec 2002
Posts: 672

PostPosted: Wed Nov 07, 2007 8:09 am    Post subject: Is there any kind of passive or reverse ssh? Reply with quote

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
View user's profile Send private message
di1bert
l33t
l33t


Joined: 16 May 2002
Posts: 963
Location: Oslo, Norway

PostPosted: Wed Nov 07, 2007 8:18 am    Post subject: Reply with quote

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
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Wed Nov 07, 2007 2:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
SiberianSniper
Guru
Guru


Joined: 06 Apr 2006
Posts: 381
Location: Dayton, OH, USA

PostPosted: Wed Nov 07, 2007 3:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum