AirV's Blog

Just another blog

SSH on MAC OSX

Extarit de ww.defense-question.com :
Posted by alex in Insights at 5:04 AM

Configure SSH To Allow Logins Without A Password:

First you will need to modify the sshd_config file which can be found in the /private/etc/ directory. The sshd_config file has a bunch of options commented out which typically means the setting to the right of that option are the default options for sshd. The option we need to modify is PermitEmptyPasswords which is located around line 57 of the sshd_config file. Make sure when you are done you set this option back to the default setting and restart SSH. We will be changing the no to a yes on line 57 as shown below.

SSHD Default PermitEmptyPasswords Configuration Setting:

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

Uncomment line 57 by removing the ‘#’ in front of PermitEmptyPasswords and change the no to a yes using your favorite text editor such as vi.

SSHD Default PermitEmptyPasswords Configuration Setting:

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
PermitEmptyPasswords yes

Once you have made the modification to allow usernames without passwords to login via SSH you can start SSH using the information below.

Start SSHD Using Mac OSX Command Line From A Terminal Window:

Starting and stopping SSHD via the OSX CLI is easy. To start SSH simply type “/sbin/service ssh start” and to stop SSH you can type “/sbin/service ssh stop”. Both of these commands are shown in the below terminal capture.

Macintosh-3:/ root# /sbin/service ssh start
Macintosh-3:/ root#
Macintosh-3:/ root# /sbin/service ssh stop
Macintosh-3:/ root#

As you can see issuing each of he above commands will provide no output to the shell. After issuing the ssh start command above you should now be able to login to the OSX device on port 22 using a valid username without a password.

**Note** Please remember to set he PermitEmptyPasswords back to “no” after you are completed and shut down SSH since most desktops and/or laptops should not have this configured by default.

 

vendredi 1 avril 2011 Posté par à 18:32 | Apple, Informatique | pas de commentaire