Wednesday, September 12, 2012

Secure Remote SSH Connection with no passwords OSX 10.7

So why does my method to set up passwordless SSH remote login no longer work with 10.8 Mountain Lion?

It used to be so easy:

  • Generate the key:
    ssh-keygen -b 1024 -t rsa -f id_rsa -P "" 
  • Copy the key to a new file:
    cp authorized_keys2
  • Create the .ssh folder on the target machine
    mkdir .ssh; chmod 0700 .ssh
  • Copy my key to the target machine:
    scp authorized_keys2 root@target:/private/var/root/.ssh

This no longer works on 10.8 Mountain Lion.

Well the solution is very simple:
The name of the file has changed.

The name of the file on the target machine containing the public key has changed.
'authorized_keys2' no longer works.

If you change the name to 'authorized_keys' it will.

That's all folks.

Tuesday, September 4, 2012

OS X Lion Mail redirection

As you might already have found out:
Workgroup Manager since 10.7 Lion no longer has an options to set any options for mail.
But they are still there. Even in 'Mountain Lion', 10.8.

Today I had to redirect a mail account of a user who left us to his successor.

In order to do so, you need the 'Directory Utility'. Is is located here

After starting the utility you have to go to LDAP and select the user. Then authenticate by clicking on the lock button using you OD admins account.

 Now here's the trick.

The parameters regarding mail are located in the xml structure named 'MailAttribute'.

The two attributes that need to be changed are:

  • kAutoForwardValue: from empty to the target email address
  • kMailAccountState: from 'Enabled' to 'Forward' 

That's all there is to it.
This may also be accomplished via command line using 'dscl'.

I found the infos I needed here.