Tuesday, 29 December 2015

Running sshd on El Capitan and compatibility with older versions

To allow myself a login on my home Mac, I open a port on my firewall and allow ssh traffic in.  I use 'prompt' on the iPad and iPhone for ssh access as well as using ssh to start VNC when using 'teleport' to allow sharing go my screen.

This all seemed to break under El Capitain as ssh access via the port over the WAN connection no longer seemed to work.

After some investigation it seems to be the case of the ciphers used by ssh on El Capitan not being as compatible as they could have been with the ssh version on the iPad.

So I did the following:

sudo vi /etc/ssh/sshd_config
And added the following line to the end of the file as one line:

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,blowfish-cbc,aes128-cbc,3des-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
I then could restart ssh on my new port and access it via the iPad/iPhone applications again.

According to the site itefix.net, this it may be related to the potentially incompatible changes introduced in OpenSSH 6.7 to remove unsafe algorithms.

Friday, 4 December 2015

Screen Sharing on El Capitan

Screen sharing on the Mac is really useful.  There are a few ways to do this once screen sharing is turned on in the System preferences pane.


  • You can select the machine name at the side of the Finder and then the "share screen" tab.
  • You can run the 'Screen Sharing' App from Spotlight or directly from "/System/Library/CoreServices/Applications/Screen Sharing"

However, did you know that when you connect via screensharing to different remote, a file is created in your home directory at 
~/Library/Containers/com.apple.ScreenSharing/Data/Library/Application Support/Screen Sharing/
containing information on how you connected to the machine?  The good thing about these files is that they can be used to reconnect to the machines by just double clicking on them.  This means that you can use screen sharing to connect to a machine much faster than the two methods shown above.

To make this more convenient for me to use I did the following.

  • Created a folder in my home directory called "Remote Machines"
  • In the Finder, select "Go" and then press the "ALT/Option" key to show the hidden folder 'Library" and then navigate down to ~/Library/Containers/com.apple.ScreenSharing/Data/Library/Application Support/Screen Sharing/
  • Option/ALT click and drag all of the files to the "Remote Machines" folder created above to copy them, rather than move them.
  • Drag the "Remote Machines" folder into the right-hand side of the dock (to the right of the faint-white lines which separate the Trash from applications)

Now when you click on that folder in the dock, you'll see a list of machines that you can connect to directly.  You can add to this folder at any time when you connect to new machines.

Note that this is not limited to other OSX machines, the files are also created if you connect with a standard VNC protocol to another machine running VNC.  e.g. Linux VNC server, Raspberry Pi VNC server etc.

Now that the folder has the links to start off a screen sharing session, the icons can be changed to make them more meaningful.  Follow my post on this for details on how to do this in El Capitan.

The same method can be used under previous versions of OSX, but the location of the Screen Saring folder is different.  e.g. under Lion they are held under:

~/Library/Application Support/Screen Sharing/

Other locations in other releases are left as an exercise for the reader.