Setup passphraseless ssh to localhost on OS X
Asked Answered
Q

5

33

I'm trying to get Hadoop's Pseudo-Distributed Operation example (http://hadoop.apache.org/common/docs/stable/single_node_setup.html) to work on OS X Lion, but am having trouble getting the ssh to work without a passphrase.

The instructions say the following:

Setup passphraseless ssh

Now check that you can ssh to the localhost without a passphrase: $ ssh localhost

I'm getting connection refused:

archos:hadoop-0.20.203.0 travis$ ssh localhost
ssh: connect to host localhost port 22: Connection refused

If you cannot ssh to localhost without a passphrase, execute the following commands:

$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa   
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

After this step I am still getting connection refused. Any ideas???

Qulllon answered 20/8, 2011 at 20:36 Comment(1)
What's the output of ls /System/Library/LaunchDaemons/ | grep sshBilletdoux
P
48

Sounds like you don't have SSH enabled. Should be in the network settings control panel somewhere.

Pascoe answered 20/8, 2011 at 20:37 Comment(1)
Got it! Thanks for pointing me in the right direction. System Preferences -> Sharing -> Remote Login needed to be enabled.Qulllon
I
7

You go to "System Preferences > Sharing > Remote Access" and there's a list of authorized users. Change it to "All Users".

That's solves this problem.

Indefatigable answered 6/1, 2018 at 9:6 Comment(0)
E
0

Check the permissions on your .ssh directory. Some ssh implementations require that the directory be chmod 700. Otherwise, they just ignore it.

Also, check the output of

ssh -v localhost

to see how the ssh client is trying to connect. The output is very detailed, and will help you decide if it's an authentication problem.

Esqueda answered 3/9, 2011 at 10:20 Comment(0)
F
0

I had the same issue. Please check if the ssh server is running or not.

If yes, open the /etc/init.d/ssh_config and /etc/init.d/sshd_config files. The issue is that the server is running on a different port and the client is pointing to different port.

Before this please ensure that openssh-server and client are installed.

Frederick answered 14/12, 2011 at 16:51 Comment(0)
H
0

I had the same problem and i solved it the following manner :

  1. SSH is activated.

  2. ssh -v localhost (as stated by Herko) In the ouput, i identified that the authentication method by DSA is not supported.

debug1: Skipping ssh-dss key /Users/john/.ssh/id_dsa - not in PubkeyAcceptedKeyTypes

  1. I simply re-generate an ECDSA keys and remove the DSA key pairs.

  2. After the keys generation, the procedure given on Hadoop documentation holds.

Therefore, it is important to check, if the authentication method is supported by the Openssh configuration.

Henderson answered 17/11, 2016 at 0:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.