SSH key in authorized_keys will only work sometimes

Published by:

I’ve been dealing with this for the last couple days but only this morning realized that there was another fact I wasn’t including in my Google searches for “ssh not using key”: that my home directory on this particular box was encrypted.

(Below text from https://help.ubuntu.com/community/SSH/OpenSSH/Keys)

If you have an encrypted home directory, SSH cannot access your authorized_keys file because it is inside your encrypted home directory and won’t be available until after you are authenticated. Therefore, SSH will default to password authentication.

To solve this, create a folder outside your home named /etc/ssh/<username> (replace “<username>” with your actual username). This directory should have 755 permissions and be owned by the user. Move the authorized_keys file into it. The authorized_keys file should have 644 permissions and be owned by the user.

Then edit your /etc/ssh/sshd_config and add:

AuthorizedKeysFile    /etc/ssh/%u/authorized_keys

Finally, restart ssh with:

sudo service ssh restart

The next time you connect with SSH you should not have to enter your password.

Quick Tip: Get a list of users logged into a Remote Desktop Services server and then log specific users out

Published by:

I discovered this tip on another site this morning but in all my years, I’d never even heard of this method so I thought I’d pass it along in case anyone else was like me.

If you are working from the command line and would like to see all of the users logged into an RDS server, use the following command:

qwinsta /server:SERVERNAME

It will enumerate the list of user IDs logged into that server, and then you can just take the session ID number from the session you want to log off and use:

logoff SESSIONID /server:SERVERNAME

Installing AutoCAD 2014 / 2015 / 2016 results in a “Establish an internet connection to continue” error during the first run

Published by:

A client purchased a license to AutoCAD 2015 and needed it installed. After the installation completed, during the first run it resulted in a “Establish an internet connection to continue” error.

As per AutoDesk documentation, we rebooted, we renamed the C:\Users\<username>\AppData\Roaming\AutoDesk\ADUT folder to ADUT2, but got nowhere.

Finally after some digging, we were able to determine that due to the POODLE SSLv3 vulnerability last year, the installer was using an outdated SSL library to communicate with the AutoDesk licensing servers. Killing all AutoDesk-related applications by going to Task Manager -> Processes -> sort by description -> End all tasks that start with “AutoDesk…” and then applying the hotfix located here, we were able to open AutoCAD properly and finish the licensing process.

Quick Tip: Redirect print jobs in MacOSX

Published by:

Today I experienced a bit of panic because I was attempting to print a business receipt from a banking webpage and sent it to a printer that I no longer have access to (stupid me, I forgot to remove it from my list when it was discarded). However, instead of losing it and worrying about having to contact my bank during a weekday, what I was able to do was simply open the print queue for the working printer and simply click and drag the print job from one to another to redirect it to the new device. No muss, no fuss.

Then I removed the old printer like I should have done months ago.