LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-11-2005, 11:30 AM   #1
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Rep: Reputation: 31
X window on remote machine!


My pc's IP is 192.168.0.21. And my pc accesses NIS server whose
IP is 133.9.42.12 through a router. The router's static IP is
133.9.42.192. I use the commands as follows:

<1>xhost +
<2>ssh 133.9.42.192 -l Ultrasoul
Ultrasoul's passwd:*******
<3> echo $SHELL
/bin/tcsh
<4>setenv DISPLAY 192.168.0.21:0.0
<5>xtem &
Can not open 192.168.0.21:0.0 display

So I tried to type as follows:
<5> setenv DISPLAY 133.9.42.192:0.0(my router's ip)
<6> xterm &
the Xterm seems to be started at server side.

I wonder if I can access NIS server by using 192.168.0.21.
I can access server by a static ip which is 133.9.42.192,
it is assigned by my network administrator!
 
Old 01-11-2005, 12:12 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 243Reputation: 243Reputation: 243
What is your output when you login with ssh and then type :
echo $SSH_CLIENT
 
Old 01-12-2005, 05:01 AM   #3
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
echo $SSH_CLIENT's output

I typed echo $SSH_CLIENT

the output is as follows:

::ffff:133.9.42.192 32912 22
133.9.42.192 is my router's outside IP Address.

Can you tell me how to set the variable DISPLAY for get Xwindows in server side to display in my PC.
My pc's IP is 192.168.0.13.
 
Old 01-12-2005, 05:09 AM   #4
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
More information!

I login the server by ssh. And type commands as follows:

<1>setenv DISPLAY 133.9.42.192:0
<2>xterm &
<3>ps -a | grep xterm

the output is as follows:
15762 pts/17 0:00 xterm

from the output, I think I have started the xterm process. But it is just be executed in server side.
how to display it in my pc by setting DISPLAY variable? or it is impossible mission by a private
IP address such as 192.168.0.*.

And I wonder what is the meaning of pts/17? Does it mean the server?

Thank you for your patience!
 
Old 01-12-2005, 06:31 AM   #5
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 243Reputation: 243Reputation: 243
after do xhost+ and loggin with ssh, try :
setenv DISPLAY 133.9.42.192:0.0

then xterm &
if it fails I would ask the admin if X server is listening TCP port to offer remote access
I would try ssh -X to connect
pts/17 is your terminal (type tty)

I would try also (but I doubt)
xterm -display 133.9.42.192:0.0 &

Last edited by Cedrik; 01-12-2005 at 06:33 AM.
 
Old 01-12-2005, 09:36 PM   #6
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
problem about failure!

I tried to login with ssh -X SunBladeServer -l ps0424 and set DISPLAY accoring to your method.
It seems to be displayed unsuccessfully!

if my pc logins with a static IP of 133.9.42.198 and set DISPLAY 133.9.42.192, i can display the Xwindow in my pc.
From it, I think the server will listen to TCP port. But I login with my Pc's IP of 192.168.0.13, I echo $SSH_CLIENT
and $SSH_CLIENT is 133.9.42.192 because my pc is connected to router whose static IP is 133.9.42.192. So my pc
's login IP is 133.9.42.192.
 
Old 01-13-2005, 10:16 AM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,325

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
if my pc logins with a static IP of 133.9.42.198 and set DISPLAY 133.9.42.192, i can display the Xwindow in my pc.
So why don't you want to login with your static ip133.9.42.198 ?
 
Old 01-13-2005, 12:05 PM   #8
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
Static IP is limited!

Because the Static IP assigned by my network administrator is
limited and We prefer to login to server and use the software in
server occurentlly. So I wonder if we can login to server with
a private IP and run Xwindows locally.
 
Old 01-29-2005, 10:12 PM   #9
elfoozo
Member
 
Registered: Feb 2004
Location: Washington, USA
Distribution: Debian
Posts: 265

Rep: Reputation: 32
Check if your network administrator has defined X11Forwarding yes in the sshd_config file.

Also maybe look at what restrictions are defined in hosts.allow depending how hardened that ssh server is.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 35 10-23-2017 12:21 AM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
how to open a dilog on local machine when i do ssh to remote machine fahad26 Programming 3 05-03-2005 07:39 PM
using linux to redirect remote vpn traffic to another remote machine brb5548 Linux - Networking 0 06-28-2003 09:07 PM
can't access to remote machine abd_bela Linux - Security 3 12-29-2002 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration