Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

ssh on both sides

 
   Soft32 Home -> Linux2 Arch -> Networking RSS
Next:  need a live CD with sshd already loaded and a pas..  
Author Message
tonia

External


Since: Sep 19, 2006
Posts: 4



(Msg. 1) Posted: Sun Jan 21, 2007 8:10 pm
Post subject: ssh on both sides
Archived from groups: comp>os>linux>networking (more info?)

Hi,

Im behind a firewall that allows certains outgoing connections but
blocks incoming ones. As I can connect from work to my house through
ssh, Im thinking on the way of keep that connection alive and when I
get home, keep in touch with it. But cant figure out how to do it. I
was thinking on netcat or vpn, but I cant guess how to do it.
Any clue?


(f this isnt the right list, sorry)

Tnx in advance!
Back to top
Login to vote
slebetman

External


Since: Jan 09, 2007
Posts: 5



(Msg. 2) Posted: Sun Jan 21, 2007 8:51 pm
Post subject: Re: ssh on both sides [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

tonia wrote:
> Hi,
>
> Im behind a firewall that allows certains outgoing connections but
> blocks incoming ones. As I can connect from work to my house through
> ssh, Im thinking on the way of keep that connection alive and when I
> get home, keep in touch with it. But cant figure out how to do it. I
> was thinking on netcat or vpn, but I cant guess how to do it.
> Any clue?
>
>

I think you can do it via ssh port forwarding. You'd need to configure
your home ssh server to allow port forwarding then from your ssh client
map a remote port on your home machine to a port on your office
network. Note that the destination port can be any machine reachable
from your office machine.

Example1: Use the current ssh tunnel to allow you to reverse ssh back
to your office machine. Map remote port 10000 to local ssh port:

.from office ssh client:

ssh -R 10000:localhost:22 username.RemoveThis@homeMachine.com

then from your home (note that you need root access to ssh to
nonstandard ports):

ssh -D 10000 officeusername.RemoveThis@127.0.0.1

Example2: Same as above but ssh back to another server on your office
network, for example 192.168.1.220. This time we map remote port 11000
to server ssh port:

.from office ssh client:

ssh -R 11000:192.168.1.220:22 username.RemoveThis@homeMachine.com

then from your home:

ssh -D 11000 username.RemoveThis@127.0.0.1


Google "ssh port forwarding" for more info.
Back to top
Login to vote
tonia

External


Since: Sep 19, 2006
Posts: 4



(Msg. 3) Posted: Sun Jan 21, 2007 10:04 pm
Post subject: Re: ssh on both sides [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

tnx for the quick (and helpful) answer!!!!

that did the trick... except i use

ssh user.RemoveThis@127.0.0.1 -p 10000

instead of

-D

btw, really simple isnt it? Smile

tnx again!


slebetman.RemoveThis@yahoo.com wrote:
> tonia wrote:
> > Hi,
> >
> > Im behind a firewall that allows certains outgoing connections but
> > blocks incoming ones. As I can connect from work to my house through
> > ssh, Im thinking on the way of keep that connection alive and when I
> > get home, keep in touch with it. But cant figure out how to do it. I
> > was thinking on netcat or vpn, but I cant guess how to do it.
> > Any clue?
> >
> >
>
> I think you can do it via ssh port forwarding. You'd need to configure
> your home ssh server to allow port forwarding then from your ssh client
> map a remote port on your home machine to a port on your office
> network. Note that the destination port can be any machine reachable
> from your office machine.
>
> Example1: Use the current ssh tunnel to allow you to reverse ssh back
> to your office machine. Map remote port 10000 to local ssh port:
>
> .from office ssh client:
>
> ssh -R 10000:localhost:22 username.RemoveThis@homeMachine.com
>
> then from your home (note that you need root access to ssh to
> nonstandard ports):
>
> ssh -D 10000 officeusername.RemoveThis@127.0.0.1
>
> Example2: Same as above but ssh back to another server on your office
> network, for example 192.168.1.220. This time we map remote port 11000
> to server ssh port:
>
> .from office ssh client:
>
> ssh -R 11000:192.168.1.220:22 username.RemoveThis@homeMachine.com
>
> then from your home:
>
> ssh -D 11000 username.RemoveThis@127.0.0.1
>
>
> Google "ssh port forwarding" for more info.
Back to top
Login to vote
slebetman

External


Since: Jan 09, 2007
Posts: 5



(Msg. 4) Posted: Mon Jan 22, 2007 9:01 am
Post subject: Re: ssh on both sides [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

tonia wrote:
> tnx for the quick (and helpful) answer!!!!
>
> that did the trick... except i use
>
> ssh user DeleteThis @127.0.0.1 -p 10000
>
> instead of
>
> -D
>
> btw, really simple isnt it? Smile
>
> tnx again!

Oops, yes it should have been -p. And you don't need to be root to do
it. Sorry, get confused sometimes Wink
Back to top
Login to vote
slebetman

External


Since: Jan 09, 2007
Posts: 5



(Msg. 5) Posted: Mon Jan 22, 2007 9:03 am
Post subject: Re: ssh on both sides [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

tonia wrote:
> tnx for the quick (and helpful) answer!!!!
>
> that did the trick... except i use
>
> ssh user RemoveThis @127.0.0.1 -p 10000
>
> instead of
>
> -D
>
> btw, really simple isnt it? Smile
>
> tnx again!

Oops, yes it should have been -p. And you don't need to be root to do
it. Sorry, get confused sometimes Wink
Back to top
Login to vote
Dave {Reply Address In.si

External


Since: Oct 09, 2006
Posts: 38



(Msg. 6) Posted: Mon Jan 22, 2007 2:41 pm
Post subject: Re: ssh on both sides [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
johnny

External


Since: Jan 23, 2007
Posts: 2



(Msg. 7) Posted: Mon Jan 22, 2007 8:29 pm
Post subject: Re: ssh on both sides [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 22 Jan 2007 02:10:49 -0800, tonia wrote:

> Hi,
>
> Im behind a firewall that allows certains outgoing connections but
> blocks incoming ones. As I can connect from work to my house through
> ssh, Im thinking on the way of keep that connection alive and when I
> get home, keep in touch with it. But cant figure out how to do it. I
> was thinking on netcat or vpn, but I cant guess how to do it.
> Any clue?
>
>
> (f this isnt the right list, sorry)
>
> Tnx in advance!

I'd be very careful about what you're trying to do. It could get you fired
for circumventing your employers security. If you have a legitimate reason
to connect to your office network from home, I'd suggest that you contact
your IT department to allow you VPN access to your employers network.
Back to top
Login to vote
Display posts from previous:   
Related Topics:
need a live CD with sshd already loaded and a passworded a.. - I have a laptop with a broken display and the display broke before I could get the networking setup on it's Fedora core...

slow upload with nfs over ssh tunnel - Hi, I have a problem with a terrible slow upload to the nfs server when the nfs protocol is passed through a ssh tunnel...

How the selection of IP address is done for a tcp socket o.. - Hi all, What i want to know is : As , generally we don't specify IP address from client while making connect call,..

How the selection of IP address is done for a tcp socket o.. - Hi all, What i want to know is : As , generally we don't specify IP address from client while making connect call,..

Printing over samba - Setup: I have a LAN connecting my Linux box and a Windows computer. The Windows computer has a printer that is not..

iptables v1.3.4: "--dport unknown argument" - I have tried different ways of using iptables - from iptables manuals, books etc. For example: # iptables -A INPUT -i...
       Soft32 Home -> Linux2 Arch -> Networking All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can 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

Categories:
 Windows
 Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]