Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication by password failed #4

Open
shaikshabana opened this issue Sep 15, 2014 · 4 comments
Open

Authentication by password failed #4

shaikshabana opened this issue Sep 15, 2014 · 4 comments

Comments

@shaikshabana
Copy link

Hi,
i am unable to login to remote machine,
the code is giving Authentication by password failed.
Please help me out.
Following are the logs from the code

2014-09-15 17:54:51.621 SSHCore[2274:70b] Host check: 2, key:
2014-09-15 17:55:08.633 SSHCore[2274:70b] Authentication by password failed.

Thanks.

@lhagan
Copy link
Owner

lhagan commented Sep 16, 2014

Are you trying to connect to a Mac server? The OS X SSH server is configured out of the box to reject password authentication, requiring instead interactive auth. SSHCore doesn't support interactive.

If I recall correctly, you should be able to work around this problem by adding PasswordAuthentication yes to your server's ssh config.

@shaikshabana
Copy link
Author

Hi lhagan,
Yes i am trying to connect to mac Machine remotely.
I have used NSTask to connect that but its not giving flexibility to connect with password,its working great with key based authentication.

What is meant by server's ssh config,can u please elaborate on this,how can i make PasswordAuthentication to Yes

Thanks for the quick reply.

@lhagan
Copy link
Owner

lhagan commented Sep 16, 2014

On the mac that you're trying to connect to, edit /etc/sshd_config, changing this line:

#PasswordAuthentication no

to:

PasswordAuthentication yes

...then restart the ssh server. The simplest way to do this is to uncheck Remote Login in System Preferences > Sharing and then re-check it.

@shaikshabana
Copy link
Author

Thanks Luke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants