ssh -R from work to home and ssh from home to work

ssh -R from work to home and ssh from home to work

Post by Sea » Sun, 05 Oct 2003 18:12:06



While I am at work I run:


While I am at home I run:


So I am now working from home.  The problem is that $DISPLAY is not
set.  This doesn't pose a problem yet because X forwarding is still
sending Xwindows to my home display.  The issue is: after I ssh to
work and then ssh to another network server the $DISPLAY variable is
set to the display of the original machine I ssh'd to and Xwindows are
now sent to it rather than home.

I don't know why $DISPLAY is not set on the original ssh but all I
want is for the windows from the second ssh'd to server to end up at
home.  Is the first problem the cause of the second?  More
importantly, how do I solve the second problem.

Thanks for any help.
Sean

 
 
 

ssh -R from work to home and ssh from home to work

Post by Bit Twiste » Sun, 05 Oct 2003 23:09:00



> While I am at work I run:


> While I am at home I run:


> So I am now working from home.  The problem is that $DISPLAY is not
> set.  This doesn't pose a problem yet because X forwarding is still
> sending Xwindows to my home display.  The issue is: after I ssh to
> work and then ssh to another network server the $DISPLAY variable is
> set to the display of the original machine I ssh'd to and Xwindows are
> now sent to it rather than home.

> I don't know why $DISPLAY is not set on the original ssh but all I
> want is for the windows from the second ssh'd to server to end up at
> home.  Is the first problem the cause of the second?  More
> importantly, how do I solve the second problem.

for starters do a    man ssh     and try -X on each ssh.

 
 
 

ssh -R from work to home and ssh from home to work

Post by Sea » Mon, 06 Oct 2003 02:16:40


> > While I am at work I run:


> > While I am at home I run:


> for starters do a    man ssh     and try -X on each ssh.

First of all thanks for responding.

So, I tried:
While I am at work I run:

While I am at home I run:

And still, after I ssh from home to work:
    prompt> echo $DISPLAY
    DISYLAY: Undefined variable.

 
 
 

ssh -R from work to home and ssh from home to work

Post by Bit Twiste » Mon, 06 Oct 2003 04:16:50



>> > While I am at work I run:


>> > While I am at home I run:


>> for starters do a    man ssh     and try -X on each ssh.

> First of all thanks for responding.

> So, I tried:
> While I am at work I run:

> While I am at home I run:

> And still, after I ssh from home to work:
>     prompt> echo $DISPLAY
>     DISYLAY: Undefined variable.

Ok, I'll guess work's sshd config file has been set to not forward
the display variable.
 
 
 

ssh -R from work to home and ssh from home to work

Post by David Efflan » Mon, 06 Oct 2003 13:52:37



>> > While I am at work I run:


>> > While I am at home I run:


>> for starters do a    man ssh     and try -X on each ssh.

> First of all thanks for responding.

> So, I tried:
> While I am at work I run:

> While I am at home I run:

> And still, after I ssh from home to work:
>     prompt> echo $DISPLAY
>     DISYLAY: Undefined variable.

I don't think you should use the -X from work to home (if it is not your
intent to display X at work).  Do you do ssh to the tunnel from an xterm
at home?  However, I think the problem is that the ssh to the tunnel makes
you appear for all intents and purposes to be on localhost on the other
end of the tunnel, so that might be where an X program might try to
display (if there was an X server running there).  If there is no X server
there, that might be why DISPLAY is undefined.

For example when I stopped my local smtp, created an ssh tunnel
25:127.0.0.1:25 to another internet host (as local root and remote normal
user) and then sent mail as a normal user, ident in the mail headers

not root at that localhost (not sure if that was because sshd was running
as root or because the tunnel was initiated as my root).  But from the
point of view on the remote, the mail appeared to come from its localhost.

So you might need to purposely tunnel X back from some port on the remote
localhost back to your localhost (with -R switch so remote localhost could
connect to it).  For example, you might try using -R 6010:127.0.0.1:6000
and not -X, and then set DISPLAY on remote to localhost:10.0 (kind of like
X11Forward normally does).

--
David Efflandt - All spam ignored  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/

 
 
 

ssh -R from work to home and ssh from home to work

Post by Sea » Mon, 06 Oct 2003 13:57:50




> >> > While I am at work I run:


> >> > While I am at home I run:


> >> for starters do a    man ssh     and try -X on each ssh.

> > First of all thanks for responding.

> > So, I tried:
> > While I am at work I run:

> > While I am at home I run:

> > And still, after I ssh from home to work:
> >     prompt> echo $DISPLAY
> >     DISYLAY: Undefined variable.

> Ok, I'll guess work's sshd config file has been set to not forward
> the display variable.

You are right.  I have since solved the problem.

Thanks

 
 
 

1. can ssh-agent work between ssh-2.3 and ssh-3.5

I have a Sun workstation copying files from a couple of Sun servers.
ssh-agent is used to avoid providing password when scp is done from crontab.
The ssh version on the workstation is 2.3. But I've just upgraded one server
to ssh-3.5, and seems ssh-agent is not working when trying to communicate
with this high version ssh machine.

Here's what I get:
warning: Authentication failed.
Disconnected; authentication cancelled by user (Authentication cancelled by
user.).
scp: warning: ssh2 client failed to authenticate. (or you have too old ssh2
installed, check with ssh2 -V)

Does any one know whether it's possible that ssh-agent running on ssh-2.3
can get authenticated on ssh-3.5? Do I need to upgrade the workstation as
well ( that will mean all other servers need to be upgraded as well, which
is not quite likely at this time ) If not, how can I set up the ssh-agent?

Thanks all

2. Solaris vs. POSIX regcomp()/regexec()

3. How to tunnel vnc through ssh (accessing home from work)

4. Writing a Windowmanager.

5. New New

6. home dir now on net, ssh no longer works

7. Apache/RH-Linux6.0: How to enable cookies

8. SSH to/from localhost works but ssh from remote fails (receives "Connection refused")

9. ssh -Y and ssh -X not working

10. Redhat 7, working with both local auto.home and nis auto.home

11. !!! Make Money Online Free Work At Home Guide Home Based Business!!!

12. !!! Make money online free work at home guide home based business!!!