0

I'm using PuTTy and X11 forwarding (XMing) and I'm trying to simply log into a linux PC in my network, from which I want to launch graphical applications. I'm following this tutorial http://www.geo.mtu.edu/geoschem/docs/putty_install.html letter by letter. When I specify the hostname and enter my username, first of all I'm not asked for a password and secondly, I get the following output:

login as: stzanos
Last login: Thu Aug 29 17:02:14 2019 from <my pc>
/usr/bin/xauth:  timeout in locking authority file 
<other pc>/stzanos/.Xauthority
'abrt-cli status' timed out
-bash: <other pc>/stzanos/.bash_profile: Permission denied
-bash-4.2$

I thought it might be XMing causing the problem, so I tried to ssh without X11 forwarding getting a similar result:

login as: stzanos
Last login: Thu Aug 29 17:04:58 2019 from <my pc>
'abrt-cli status' timed out
-bash: <other pc>/stzanos/.bash_profile: Permission denied
-bash-4.2$

This is pretty weird. I am able to login from my CentOS VirtualBox with $ssh -Y <other pc> after entering username and password but when I'm trying to login from the Windows 10 with PuTTy I cannot. Is this an XMing issue? Is there something I'm missing? Could the other PC be blocking my user entering specifically from windows? I'm pretty confused

Thanks in advance for any help or comment

0

There is an issue on the machine you are trying to connect to. The file .bash_profile doesn't have the right permissions on it. This file is executed whenever you try to open a login shell.

You can either delete the file (because its not explicitly needed), or you can fix the permissions.

To delete the file, I would just rename it because maybe you might need it later.

mv ~/.bash_profile ~/old_bash_profile

The permissions should probably be read and execute by all, write by user. That would be 755 permissions code.

chmod 755 ~/.bash_profile

  • Thanks! But why can I login from the CentOS VirtualBox of the same machine but not the initial one? It's not like they gave me permissions only for the VirtualBox – Stamatis Tzanos Aug 30 '19 at 7:37
  • Something your client is sending has reclassified one of your sessions as "not a login shell" which would skip running .bash_profile. Its also possible one client requested not to run any profile file. For example, --no-profile. I would dig around in your target machines ssh logs. It should list any differences in what your clients requested. Your top level SSH log is at /var/log/auth.log. If that doesn't explain the difference, you may need to do some more digging and turn up logging verbosity. The SSHD_config man page will give more information. linux.die.net/man/5/sshd_config – Andy Aug 30 '19 at 18:25
  • You need to figure out what is different so you can figure out where that setting is in Putty and how to set it up correctly. – Andy Aug 30 '19 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.