Category Archives: Linux

How to have htop save configuration on exit

htop is awesome. I use it all the time to monitor all the servers I use. It was only until recently that I noticed it has some great configuration options, namely the "Tree View." This allows you to see a hierarchy of processes, which can be really helpful in finding out why certain processes are running.

I quickly realized it would be a pain to have to constantly hit F5 every time I opened the program, until I realized there was a way to make htop remember your last configuration.

What you want to do is make sure you close out of htop with F10 instead of Ctrl+C, which I normally use. You only need to use F10 when you want to save the settings, and can subsequently close out how you normally do!

[ad]

How to Fix Linux SSH: Permission denied (publickey).

I just got done setting up a user in my new developer environment on multiple boxes. I made sure to copy over the authorized_keys file exactly, including the correct 0600 permissions, but kept getting the "Permission denied (publickey)" error when trying to ssh into one box, even though all the others worked.

What finally solved it for me was to make sure the user's password is set:

# passwd <user>

If that doesn't work, make sure the user's .ssh directory is chmod 0700 and the user's authorized_keys file is chmod 0600.

[ad]