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

Permission denied (publickey). #24

Closed
martinos opened this issue Dec 17, 2013 · 12 comments
Closed

Permission denied (publickey). #24

martinos opened this issue Dec 17, 2013 · 12 comments

Comments

@martinos
Copy link

From one of my client host, when I launch the ssh I the following message:

Permission denied (publickey).

When I

ssh -v blabla@ny.tmate.io 2>&1 | tail

I get

debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/martinos/.ssh/id_rsa
debug1: Trying private key: /home/martinos/.ssh/id_dsa
debug1: Trying private key: /home/martinos/.ssh/id_ecdsa
debug1: No more authentication methods to try.

I don't understand because I am able to access my tmate server from other hosts on the net.

Do you have an idea of what might be the issue?

@nviennot
Copy link
Member

Hum... I don't really understand why this would happen :(

@martinos
Copy link
Author

Yesterday, I have found what was causing the issue. My client did not have a ssh key.

Oups

@nviennot
Copy link
Member

Okay great :)

@rmmh
Copy link

rmmh commented Dec 12, 2014

Having to run ssh-keygen is annoying. It would be better if tmate accepted both pubkey and password auth, accepting any key and any password.

@nviennot
Copy link
Member

I could make the authentication optional by patching libssh, this might be better

@nviennot
Copy link
Member

nevermind the patching. libssh works just fine.

ssh clients work like that:

  • the client tries the "none" auth method
  • if auth is required, server must reply with the possible other auth methods "pubkey, password, etc"
  • the client tries the next possible available auth method. (but not "none").

the problem if I allow no authentication is that I will never have the chance to grab a public key (which will be very useful in the future when html5 comes in the mix), and also I might increase noise due to ssh bruteforcing bots.

@apennebaker-ni
Copy link

Same problem for me and my friend.

@stdint
Copy link

stdint commented Jul 14, 2015

Same problem as well... It is a little annoying that the other party needs to run ssh-keygen...
But doesn't matter...I guess...

@kauser-cse-buet
Copy link

Hi, @martinos ,

How you solved the problem. Can you share please?

@dcorking
Copy link

dcorking commented Jun 1, 2017

@kauser-cse-buet He wrote that he solved it: 'My client did not have a ssh key.' so we can imagine he used ssh-keygen :)

@annacruz
Copy link

I'm having this issue with a key with passphrase could someone help me?

@webknjaz
Copy link

@annacruz use ssh -i ~/.ssh/your_key ... and it will ask for a key password. Also if you're using ssh-agent, you can ssh-add ~/.ssh/your_key upfront, enter password and ssh-agent daemon will remember your key decrypted in memory and then ssh will be able to use it w/o prompting for a password

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

9 participants