Avatar of anshuma
anshuma
Flag 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
Linux DistributionsLinux

Avatar of undefined
Last Comment
anshuma

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
gheist

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
arnold

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Gerwin Jansen

Which X server / command are you trying to start? What is your goal besides enabling X forwarding?
gheist

xauth is invoked when X11Forwarding works fine.
That line just confirms everything is well server side.
anshuma

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
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
arnold

What are you doing?
You can open xterm and then sudo.
gheist

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.
gheist

Why not A grade for explaining that there is no problem, it is just how Linux works?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
anshuma

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