LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-25-2005, 12:14 PM   #1
meme
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Rep: Reputation: 0
SSH -Y problem


Hello,

I have a question regarding SSH and SSH -Y

If I use this way to login:
SSH username@server

After accessing to server, I can not open emacs or matlab or any software in that machine. (For example, when I input emacs &, nothing pop out)

But, if I use this way to login:
SSH -Y username@server1

Emacs and matlab can be opened.

Is there any way to modify the setting or something else so that login by SSH without -Y can work properly as login by SSH -Y.

Thanks in advance
 
Old 10-25-2005, 12:48 PM   #2
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
In the ~/.ssh/config (or /etc/ssh/ssh_config for global) change or add
ForwardX11Trusted Yes
You can also add other variables such as the server and username if you wish.
You can find more information on that in the ssh config (5) man page.

Last edited by Zero-0-Effect; 10-25-2005 at 12:52 PM.
 
Old 10-25-2005, 12:52 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
OP: Nope, not that I know of. You will have to explicitly tell it to use the -Y option.

One thing you could do is create an alias for yourself to make it easier.

Code:
alias sshy='ssh -Y'
If you want, append that line to your ~/.profile so that it's always in effect.
 
Old 10-25-2005, 01:09 PM   #4
pomsailasuta
LQ Newbie
 
Registered: Oct 2005
Location: hawaii
Posts: 7

Rep: Reputation: 0
does ssh works if both both PC are behind firewalls?

I used 'ssh -Y -l login_name IP'
it works for me but I can not display any application from the other Linux.
I did do xhost + command.
 
Old 10-25-2005, 01:09 PM   #5
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
Quote:
OP: Nope, not that I know of. You will have to explicitly tell it to use the -Y option.
Did you not read my post or the man page for ssh config ??
 
Old 10-25-2005, 01:27 PM   #6
pomsailasuta
LQ Newbie
 
Registered: Oct 2005
Location: hawaii
Posts: 7

Rep: Reputation: 0
Sorry for being stupid, I am new at this. I will search for your posting ( if I can find it ).

thanks again.
 
Old 10-25-2005, 02:59 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Did you not read my post or the man page for ssh config ??
Your post appeared as I was typing mine.

So ForwardX11Trusted assumes the -Y option? That's what the OP is going for. I read the man page entry you cited and its description is a little unclear to me.

If you've tested this and it works as advertised, that's good.
 
Old 10-25-2005, 03:29 PM   #8
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
Quote:
If you've tested this and it works as advertised, that's good.
When I read the man page it sounded exactly like what that is supposed to do. Im wanting to see if this works myself really. At the moment I cant test it out but here shortly Ill be back at home and will do so.


Quote:
Sorry for being stupid, I am new at this. I will search for your posting ( if I can find it ).
That response wasnt for you, and the post I was referring to was the second post in this thread.


Quote:
Your post appeared as I was typing mine.
Guess the same thing happend to both of us now. He posted just before I posted.
 
Old 10-25-2005, 03:44 PM   #9
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally posted by pomsailasuta
does ssh works if both both PC are behind firewalls?

I used 'ssh -Y -l login_name IP'
it works for me but I can not display any application from the other Linux.
I did do xhost + command.
It should work. You shouldn't do any "xhost" stuff. Is the SSH server set to allow X forwarding? (Make sure the "X11Forwarding yes" directive is set in /etc/ssh/sshd_config)
 
Old 10-28-2005, 02:07 PM   #10
meme
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for all your kind help.

I checked them:
/etc/ssh/ssh_config
ForwardX11Trusted is already set to be yes

And,
/etc/ssh/sshd_config
X11Forwarding is also set to be yes

But, it still can not work.

Any suggestions will be highly appreciated.
Thanks
 
Old 10-28-2005, 04:01 PM   #11
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
You might consider using the alias approach I mentioned earlier in the thread. Just one idea.
 
Old 10-28-2005, 04:21 PM   #12
meme
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you anomie.
I will use alias approach as you said.
 
Old 10-28-2005, 10:52 PM   #13
pomsailasuta
LQ Newbie
 
Registered: Oct 2005
Location: hawaii
Posts: 7

Rep: Reputation: 0
My works just fine now. thanks for all your suggestions.

My problem is that the IP address that my router assigned to my PC is not known to the outside world except
in my house, so after I switched to my internet subscriber line, it works!!!!!!
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
SSH problem bison Linux - Software 7 12-09-2005 06:48 AM
ssh problem UmneyDurak Fedora 4 04-27-2005 08:02 PM
SSH problem silver2003 Linux - Security 2 09-30-2004 03:05 PM
SSH-Problem pemo Linux - Networking 0 07-08-2003 07:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:39 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