RSSCategory: Apple

Public Key authentication using ssh


Something thats been puzzling me for a little while was preventing password authenticated logins to the OS X Server with via ssh. Setting this up on a Linux box is a sinch but for some reason I couldn’t get this done on OS X.

Finally this has been solved.

cd in to your local .ssh directory. If you don’t have one then run the line below and it will take care of that.

[code language=”plain”]mkdir ~/.ssh; cd ~/.ssh

The next step it to generate you public and private keys

[code language=”plain”]ssh-keygen -t dsa

Follow the prompts and enter you chosen password. Choose wisely and remember it. The next step is to copy the public key over to the remote machine and create the appropreate key file.

[code language=”plain”]cat ~/.ssh/ | ssh ‘cat >> ~/.ssh/authorized_keys’

Now we have the basics in place try to ssh in to your remote server ssh and you should now be asked for you public key password. Yes the one you used to create the public and private keys. This you can save in your keychain should you wish. Now with the password entered you should be able to straight in to the remote server.

Now that we have access to the server my advice would be to open another terminal window and log in to the server for a second time. This is a safe guard and a way to correct any errors or typo’s you may have during the next steps.

Now open the /etc/sshd_config file, I use vim but nano is equally as good. As always create a cpy of the orginal file before we edit it.

[code language=”plain”] sudo cp /etc/sshd_config /etc/sshd_config.old; sudo vim /etc/sshd_config

I created a sectoin within the file so I can locate my edits and entered or un-commented.

[code language=”plain”]# Authentication:

LoginGraceTime 1m
PermitRootLogin no
StrictModes yes
MaxAuthTries 4
MaxSessions 4

RSAAuthentication yes
PubkeyAuthentication yes

# My Additions…
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no

The above are the edits I have made to my sshd_config file. Copy the missing lines and edit the exsisting to match the above.

Now log out of one of your current ssh sessions and the log back in. You shhould all being good log in with public key authentication, no password prompt. Now log out and try to log back in with a user who has remote login permission. You should be denied access.

All is working as it should.

May 25, 2015 | By | Reply More

Duet: A great iOS app

I’ve been using AirDisplay between my Macbook Air and iPad for sometime and on the whole I’ve been very happy with the setup. Its great to be able to use my iPad as a second monitor and extend my desktop’s display in to it. AirDisplay make the connection between desktop and iOS over a wireless network and there is some lag on slower networks. Although this has never been a huge problem it has at times frustrated me a little.

Today however I received an email form Duetdisplay with their release of the app Duet. They too are offering to extend your desktop on to your iOS device but buy utilising the lightening cable. I have just installed the iOS and the OS X apps and I have to say I’m seriously impressed. There is no lag at all and the resolution looks a lot sharper. The only downside at present is only being able to use one device at a time. AirDisplay allows the connection of multiple devices. Again not a deal breaker for me as I only tend to use my iPad.


If you want to extend your desktop Duet is a great solution and its super easy to set up.

Link to iTunes: Duet

Link to Website

December 19, 2014 | By | Reply More

OS X Server – Caching

I’ve been running OS X Server for some time now and all has been running just nice and smooth. That is all but the Caching of apps & iTunes updates etc. I have been racking my brain trying to figure out why only a small percentage of updates are cached.

After upgrading my server 10 Yosemite I thought I’d investigate further. As it turned out I didn’t have to look far. This Apple Support Page – highlighted the problem.

I have a UK Apple ID and I live in China. So the Caching Server might not be the best option for me.

November 19, 2014 | By | Reply More

Backing up iOS purchases

I keep my iTunes Library on an external Hard Disk. Nothing wrong with that I guess. Well that is until your external disk fails. Then you have lost all of your purchases and music. 

All is not lost however if your disk fails there are some steps you can take to download all your apps.

Firstly connect your iOS device to iTunes and transfer purchases. This will copy all the paid content from you device in to your iTunes Library.

Secondly you can re-download all your purchases from the App Store through iTunes.

Open iTunes if you haven’t already. I’m on iTunes 12 here but the steps and buttons should be labeled the same only in different places. 

Select Apps and the click the App Store button

Now scroll down to the very bottom of the App Store window and look for the ‘Features’ label.
Now click on ‘Purchased’ and you should be taken to all of your purchases for your account.
From here you can download all of your purchased music, tv shows, movies and apps.
Depending on your connection speed this could take some time.

October 29, 2014 | By | Reply More