0

Ubuntu 16.04, Acer laptop, i5, 6GB, 256SSD

Hi, I need to SSH to my Pi so I installed puTTY. Unless I start puTTY via the terminal with sudo putty and then password, it will not save the default or defined logins details. It will not even retrieve logins created and saved with root access. I could live with that.

I did some research and dialout:x:20:my-username is already in the group file and no number of reboots gives puTTY the access to the root-saved data.

How can I launch puTTY via Unity and allow it to save stuff, or at least read the root config files?

Thanks

1 Answers1

3

This is why you should not ever run GUI applications as root.

PuTTY stores its configuration in ~/.putty, a hidden folder in your home directory. This directory and its contents are supposed to be owned by you.

If you run sudo putty, this will change the effective user id, but keep most of the current environment, including the home directory path. So all newly created files in that location will be owned by root instead of your user, and when you run putty normally next time, you won't be able to read them.

To fix this, restore your ownership of these files using the command

sudo chown -R $USER: ~/.putty

After that, keep in mind to not use sudo putty any more. There should never be a need to run this application with elevated privileges at all, I believe. However, if you need it for whatever reason, use sudo -H putty to make it use root's home directory /root instead of yours.

Byte Commander
  • 110,243