Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am trying to get SSH/SFTP working on my iMac running Lion so that one of my friends can connect to me remotely. I have managed to get it working using my local user account, but I need to understand how I can add an additional account that my friend could use to SSH into my machine. This is probably really simple, but if someone could point me in the right direction in would be appreciated.

share|improve this question
    
Can't you create a guest account with SSH enabled on it? Or create a new user account and allow SSH/FTP on it. If your friend is outside the local network, you'll also need to enable port forwarding. –  daviesgeek Oct 19 '11 at 20:21
add comment

1 Answer

Easiest way in this case is to just

  • create another user using the Preferences panel
  • log into this user locally
  • generate the appropriate SSH key pair
  • transfer the public key to your friend over a secure channel

In addition you may want to tighten up your system a bit by preventing SSH logins without keys. Open /etc/sshd_config in any text editor and set

PasswordAuthentication no
PermitEmptyPasswords no

Afterwards restart SSH by disabling and enabling remote login in Preferences.

share|improve this answer
    
Superb - thanks very much for your help. That worked. :) –  Paul Maddison Oct 20 '11 at 21:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.