Link to home
Start Free TrialLog in
Avatar of Amit
AmitFlag for United States of America

asked on

cannot connect to red-hat linux via putty x11

Hi,

I need to get putty working with xforwarding I am getting the following error

Authenticating with public key "imported-openssh-key"
Last login: Sun Nov  1 17:14:22 2015 from -------------
/usr/bin/xauth:  file /home/myusername/.Xauthority does not exist
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Which X server / command are you trying to start? What is your goal besides enabling X forwarding?
xauth is invoked when X11Forwarding works fine.
That line just confirms everything is well server side.
Avatar of Amit

ASKER

my apologies this works fine when I am logged in as the user that connects from putty, it fails when I am logged in as root.

I have figured out the process of getting the magic cookie and sticking it and then getting root to work

How can this work automatically as soon as I do sudo
What are you doing?
You can open xterm and then sudo.
It does not work like you imagined.
Running X11 programs as root is very insecure.
You should read "sudoers" manual page on how to preserve $HOME over sudo.
Let me repeat - this venture is really insecure
And you should not automate anything in this regard ever.
Why not A grade for explaining that there is no problem, it is just how Linux works?
Avatar of Amit

ASKER

how can I revert to grade A. I was using my cell to close the question and might have fat fingered something