SSH: Permission denied (publickey,gssapi-with-mic,password)ssh authentication nfsHow do you manage ssh keys to add a second user?SSH accepts publickey authetication but won't connect with an identify file?Cannot SSH into Ubunto 10.10 running on EC2 as new userOpenSSH disable ControlMaster for given hostnameProblems with SSHCan't SSH into Amazon EC2AWS :: Ubuntu instance consistently denying my private keysHow to properly use rsync Push with SSH on local macOS to remote Debian
LocalDate.plus Incorrect Answer
Is it a Munchausen Number?
What does i386 mean on macOS Mojave?
How does Howard Stark know this?
Washer drain pipe overflow
Can 'sudo apt-get remove [write]' destroy my Ubuntu?
"Right on the tip of my tongue" meaning?
stdout and stderr redirection to different files
Two researchers want to work on the same extension to my paper. Who to help?
Are there variations of the regular runtimes of the Big-O-Notation?
How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?
Why does "decimal.TryParse()" always return 0 for the input string "-1" in the below code?
Unit Test - Testing API Methods
How to select certain lines (n, n+4, n+8, n+12...) from the file?
How did Thanos not realise this had happened at the end of Endgame?
What food production methods would allow a metropolis like New York to become self sufficient
Can I use my laptop, which says 240V, in the USA?
the lecture's place or where the lecture takes place
Drawing perpendicular lines, filling areas
Why was the Ancient One so hesitant to teach Dr. Strange the art of sorcery?
Should these notes be played as a chord or one after another?
Is a diamond sword feasible?
Remove everything except csv file Bash Script
Can you book a one-way ticket to the UK on a visa?
SSH: Permission denied (publickey,gssapi-with-mic,password)
ssh authentication nfsHow do you manage ssh keys to add a second user?SSH accepts publickey authetication but won't connect with an identify file?Cannot SSH into Ubunto 10.10 running on EC2 as new userOpenSSH disable ControlMaster for given hostnameProblems with SSHCan't SSH into Amazon EC2AWS :: Ubuntu instance consistently denying my private keysHow to properly use rsync Push with SSH on local macOS to remote Debian
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
====================================================================
UPDATE:
It turned out the configuration of sshd on host2 wont allow password
login. Thanks to people answered this.
====================================================================
Scenario:
Working with a company for my college project.
I need to use PuTTy to SSH into host1 first, and from there SSH into host2 (see below).
I was given a username and password on host2.
I do not have access of host2 at all, so I have no knowledge of its sshd_config.
This is what happened when I was trying to SSH into host2 from host1 :
ff@host1:~$ ssh -v host2
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /home/ff/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to host2 [192.*.*.*] port 22.
debug1: Connection established.
debug1: identity file /home/ff/.ssh/identity type -1
debug1: identity file /home/ff/.ssh/id_rsa type -1
debug1: identity file /home/ff/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'sd01' is known and matches the RSA host key.
debug1: Found key in /home/ff/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ff/.ssh/identity
debug1: Trying private key: /home/ff/.ssh/id_rsa
debug1: Trying private key: /home/ff/.ssh/id_dsa
debug1: Next authentication method: password
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-with-mic,password).
and my /home/ff/.ssh/config :
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# HostbasedAuthentication no
BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# AuthorizedKeysFile .ssh/authorized_keys
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
I wonder is there anything I can do before go to the company.
ssh ssh-agent
add a comment |
====================================================================
UPDATE:
It turned out the configuration of sshd on host2 wont allow password
login. Thanks to people answered this.
====================================================================
Scenario:
Working with a company for my college project.
I need to use PuTTy to SSH into host1 first, and from there SSH into host2 (see below).
I was given a username and password on host2.
I do not have access of host2 at all, so I have no knowledge of its sshd_config.
This is what happened when I was trying to SSH into host2 from host1 :
ff@host1:~$ ssh -v host2
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /home/ff/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to host2 [192.*.*.*] port 22.
debug1: Connection established.
debug1: identity file /home/ff/.ssh/identity type -1
debug1: identity file /home/ff/.ssh/id_rsa type -1
debug1: identity file /home/ff/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'sd01' is known and matches the RSA host key.
debug1: Found key in /home/ff/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ff/.ssh/identity
debug1: Trying private key: /home/ff/.ssh/id_rsa
debug1: Trying private key: /home/ff/.ssh/id_dsa
debug1: Next authentication method: password
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-with-mic,password).
and my /home/ff/.ssh/config :
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# HostbasedAuthentication no
BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# AuthorizedKeysFile .ssh/authorized_keys
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
I wonder is there anything I can do before go to the company.
ssh ssh-agent
is the username "ff" on host 2 correct?
– etagenklo
May 23 '14 at 11:52
@etagenklo yeah that's what I was given.
– gherkin
May 23 '14 at 12:21
You should ask the administrator ofhost2.
– jornane
May 23 '14 at 16:25
I had the same issue. I think the cause is that I had something set up wrong in the user's $HOME/.ssh folder. After mv $HOME/.ssh $HOME/.ssh.hide I could log in using ssh password
– JackBauer35
May 27 '15 at 20:51
add a comment |
====================================================================
UPDATE:
It turned out the configuration of sshd on host2 wont allow password
login. Thanks to people answered this.
====================================================================
Scenario:
Working with a company for my college project.
I need to use PuTTy to SSH into host1 first, and from there SSH into host2 (see below).
I was given a username and password on host2.
I do not have access of host2 at all, so I have no knowledge of its sshd_config.
This is what happened when I was trying to SSH into host2 from host1 :
ff@host1:~$ ssh -v host2
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /home/ff/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to host2 [192.*.*.*] port 22.
debug1: Connection established.
debug1: identity file /home/ff/.ssh/identity type -1
debug1: identity file /home/ff/.ssh/id_rsa type -1
debug1: identity file /home/ff/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'sd01' is known and matches the RSA host key.
debug1: Found key in /home/ff/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ff/.ssh/identity
debug1: Trying private key: /home/ff/.ssh/id_rsa
debug1: Trying private key: /home/ff/.ssh/id_dsa
debug1: Next authentication method: password
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-with-mic,password).
and my /home/ff/.ssh/config :
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# HostbasedAuthentication no
BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# AuthorizedKeysFile .ssh/authorized_keys
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
I wonder is there anything I can do before go to the company.
ssh ssh-agent
====================================================================
UPDATE:
It turned out the configuration of sshd on host2 wont allow password
login. Thanks to people answered this.
====================================================================
Scenario:
Working with a company for my college project.
I need to use PuTTy to SSH into host1 first, and from there SSH into host2 (see below).
I was given a username and password on host2.
I do not have access of host2 at all, so I have no knowledge of its sshd_config.
This is what happened when I was trying to SSH into host2 from host1 :
ff@host1:~$ ssh -v host2
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /home/ff/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to host2 [192.*.*.*] port 22.
debug1: Connection established.
debug1: identity file /home/ff/.ssh/identity type -1
debug1: identity file /home/ff/.ssh/id_rsa type -1
debug1: identity file /home/ff/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'sd01' is known and matches the RSA host key.
debug1: Found key in /home/ff/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ff/.ssh/identity
debug1: Trying private key: /home/ff/.ssh/id_rsa
debug1: Trying private key: /home/ff/.ssh/id_dsa
debug1: Next authentication method: password
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
ff@sd01's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-with-mic,password).
and my /home/ff/.ssh/config :
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# HostbasedAuthentication no
BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# AuthorizedKeysFile .ssh/authorized_keys
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
I wonder is there anything I can do before go to the company.
ssh ssh-agent
ssh ssh-agent
edited Nov 23 '15 at 10:32
gherkin
asked May 23 '14 at 11:36
gherkingherkin
176116
176116
is the username "ff" on host 2 correct?
– etagenklo
May 23 '14 at 11:52
@etagenklo yeah that's what I was given.
– gherkin
May 23 '14 at 12:21
You should ask the administrator ofhost2.
– jornane
May 23 '14 at 16:25
I had the same issue. I think the cause is that I had something set up wrong in the user's $HOME/.ssh folder. After mv $HOME/.ssh $HOME/.ssh.hide I could log in using ssh password
– JackBauer35
May 27 '15 at 20:51
add a comment |
is the username "ff" on host 2 correct?
– etagenklo
May 23 '14 at 11:52
@etagenklo yeah that's what I was given.
– gherkin
May 23 '14 at 12:21
You should ask the administrator ofhost2.
– jornane
May 23 '14 at 16:25
I had the same issue. I think the cause is that I had something set up wrong in the user's $HOME/.ssh folder. After mv $HOME/.ssh $HOME/.ssh.hide I could log in using ssh password
– JackBauer35
May 27 '15 at 20:51
is the username "ff" on host 2 correct?
– etagenklo
May 23 '14 at 11:52
is the username "ff" on host 2 correct?
– etagenklo
May 23 '14 at 11:52
@etagenklo yeah that's what I was given.
– gherkin
May 23 '14 at 12:21
@etagenklo yeah that's what I was given.
– gherkin
May 23 '14 at 12:21
You should ask the administrator of
host2.– jornane
May 23 '14 at 16:25
You should ask the administrator of
host2.– jornane
May 23 '14 at 16:25
I had the same issue. I think the cause is that I had something set up wrong in the user's $HOME/.ssh folder. After mv $HOME/.ssh $HOME/.ssh.hide I could log in using ssh password
– JackBauer35
May 27 '15 at 20:51
I had the same issue. I think the cause is that I had something set up wrong in the user's $HOME/.ssh folder. After mv $HOME/.ssh $HOME/.ssh.hide I could log in using ssh password
– JackBauer35
May 27 '15 at 20:51
add a comment |
10 Answers
10
active
oldest
votes
The username and password you are trying are not accepted by the host. That means either you are connecting to the wrong server, or the username or password is incorrect. You should ask the administrator to check the logs on host2, that should tell you which of the three is the case.
2
It's like could you be any more stupid, ofc I have the right passwords. And then you remember different keyboard layouts. Thanks for making me revisit :)
– skyw00lker
Oct 28 '16 at 14:55
@skyw00lker That's the reason I personally use alphanumeric passwords.
– kasperd
Oct 28 '16 at 20:17
add a comment |
First
chmod 700 .ssh
and then :
chmod 600 .ssh/authorized_keys
and test this :
restorecon -r -vv .ssh/authorized_keys
add a comment |
In my case, It was caused by encryption of the home directory. I have changed the location of the ssh keys and it resolved the issue : (Web Archive copy)
http://tweaktheserver.com/ssh-cant-connect-authentications-that-can-continue-publickeygssapi-keyexgssapi-with-micpassword/
2
Please add the essence of the solution into your answer. Link-only answers are susceptible to link rot.
– Deer Hunter
Apr 20 '15 at 6:11
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
– Mark Henderson♦
Apr 20 '15 at 6:26
thanks for your suggestions. I understand that a working link can be a '404 error' in future and it is important to mention the points in the answer itself. I have edited my answer as well.
– user173141
Apr 26 '15 at 5:45
@DeerHunter was prophetic: link rotted
– Riet
Feb 5 '16 at 23:34
@Riet - edit suggested. All is not lost. Meanwhile you can visit the captured copy of the page.
– Deer Hunter
Feb 5 '16 at 23:42
add a comment |
GSSAPI authentication seems to be enabled in the client, yet it fails and falls back to password authentication. If you cannot login with supplied login and password, then the only sensible thing to do is to contact someone responsible for managing the server (the "company").
add a comment |
I had the same problem, but the issue for me was that the default configuration of the operating system (CentOS 7) was to encrypt the user directory, so that the authorized_keys file placed in ~/.ssh/ would not work. The solution came from here but basically:
- in
/etc/ssh/sshd_configset the AuthorizedKeysFile property to something outside of the user's directory (/etc/ssh/authorized_keys) - restart the sshd service
add a comment |
try:
ssh server -p port -o PreferredAuthentications=publickey
please be a little more verbose about why the OP should use your command and what it does. also usingcode stylingfor commands is deemed good style:``
– Phillip -Zyan K Lee- Stockmann
May 1 at 19:26
add a comment |
I needed to give /home/ec2-user permissions 700:
chmod -R 700 /home/ec2-user/
Why the vote to delete?
– duhaime
Nov 7 '18 at 21:23
add a comment |
Let me add that you should ensure that the key belongs to your user.
Type ls -la to see which user your key belongs to.
You can change the ownership:
sudo chown ubuntu:root myKey //If you are using ubuntu.
Also ensure:
- You are using the correct
.pemkey if using linux (putty is different) - You have set the correct key permissions:
sudo chmod 400 mykey.pem - You are using the correct username:
ssh -i mykey user@instanceip
add a comment |
You can try
ssh server -l user -o "PubkeyAuthentication=no"
OR in /etc/ssh/sshd_config, add/modify the property
PermitRootLogin yes
ssh server -l user -o "PubkeyAuthentication=no"equalssh user@server -o "PubkeyAuthentication=no"
– Adriano
Apr 11 '17 at 12:03
add a comment |
$ ssh Vagrant@192.168.33.11 -i .vagrant/machines/default/virtualbox/private_key
This worked for me
add a comment |
protected by womble♦ May 1 at 23:22
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
10 Answers
10
active
oldest
votes
10 Answers
10
active
oldest
votes
active
oldest
votes
active
oldest
votes
The username and password you are trying are not accepted by the host. That means either you are connecting to the wrong server, or the username or password is incorrect. You should ask the administrator to check the logs on host2, that should tell you which of the three is the case.
2
It's like could you be any more stupid, ofc I have the right passwords. And then you remember different keyboard layouts. Thanks for making me revisit :)
– skyw00lker
Oct 28 '16 at 14:55
@skyw00lker That's the reason I personally use alphanumeric passwords.
– kasperd
Oct 28 '16 at 20:17
add a comment |
The username and password you are trying are not accepted by the host. That means either you are connecting to the wrong server, or the username or password is incorrect. You should ask the administrator to check the logs on host2, that should tell you which of the three is the case.
2
It's like could you be any more stupid, ofc I have the right passwords. And then you remember different keyboard layouts. Thanks for making me revisit :)
– skyw00lker
Oct 28 '16 at 14:55
@skyw00lker That's the reason I personally use alphanumeric passwords.
– kasperd
Oct 28 '16 at 20:17
add a comment |
The username and password you are trying are not accepted by the host. That means either you are connecting to the wrong server, or the username or password is incorrect. You should ask the administrator to check the logs on host2, that should tell you which of the three is the case.
The username and password you are trying are not accepted by the host. That means either you are connecting to the wrong server, or the username or password is incorrect. You should ask the administrator to check the logs on host2, that should tell you which of the three is the case.
answered May 23 '14 at 13:18
kasperdkasperd
26.8k1252104
26.8k1252104
2
It's like could you be any more stupid, ofc I have the right passwords. And then you remember different keyboard layouts. Thanks for making me revisit :)
– skyw00lker
Oct 28 '16 at 14:55
@skyw00lker That's the reason I personally use alphanumeric passwords.
– kasperd
Oct 28 '16 at 20:17
add a comment |
2
It's like could you be any more stupid, ofc I have the right passwords. And then you remember different keyboard layouts. Thanks for making me revisit :)
– skyw00lker
Oct 28 '16 at 14:55
@skyw00lker That's the reason I personally use alphanumeric passwords.
– kasperd
Oct 28 '16 at 20:17
2
2
It's like could you be any more stupid, ofc I have the right passwords. And then you remember different keyboard layouts. Thanks for making me revisit :)
– skyw00lker
Oct 28 '16 at 14:55
It's like could you be any more stupid, ofc I have the right passwords. And then you remember different keyboard layouts. Thanks for making me revisit :)
– skyw00lker
Oct 28 '16 at 14:55
@skyw00lker That's the reason I personally use alphanumeric passwords.
– kasperd
Oct 28 '16 at 20:17
@skyw00lker That's the reason I personally use alphanumeric passwords.
– kasperd
Oct 28 '16 at 20:17
add a comment |
First
chmod 700 .ssh
and then :
chmod 600 .ssh/authorized_keys
and test this :
restorecon -r -vv .ssh/authorized_keys
add a comment |
First
chmod 700 .ssh
and then :
chmod 600 .ssh/authorized_keys
and test this :
restorecon -r -vv .ssh/authorized_keys
add a comment |
First
chmod 700 .ssh
and then :
chmod 600 .ssh/authorized_keys
and test this :
restorecon -r -vv .ssh/authorized_keys
First
chmod 700 .ssh
and then :
chmod 600 .ssh/authorized_keys
and test this :
restorecon -r -vv .ssh/authorized_keys
answered Sep 3 '17 at 10:40
Ali ZemaniAli Zemani
412
412
add a comment |
add a comment |
In my case, It was caused by encryption of the home directory. I have changed the location of the ssh keys and it resolved the issue : (Web Archive copy)
http://tweaktheserver.com/ssh-cant-connect-authentications-that-can-continue-publickeygssapi-keyexgssapi-with-micpassword/
2
Please add the essence of the solution into your answer. Link-only answers are susceptible to link rot.
– Deer Hunter
Apr 20 '15 at 6:11
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
– Mark Henderson♦
Apr 20 '15 at 6:26
thanks for your suggestions. I understand that a working link can be a '404 error' in future and it is important to mention the points in the answer itself. I have edited my answer as well.
– user173141
Apr 26 '15 at 5:45
@DeerHunter was prophetic: link rotted
– Riet
Feb 5 '16 at 23:34
@Riet - edit suggested. All is not lost. Meanwhile you can visit the captured copy of the page.
– Deer Hunter
Feb 5 '16 at 23:42
add a comment |
In my case, It was caused by encryption of the home directory. I have changed the location of the ssh keys and it resolved the issue : (Web Archive copy)
http://tweaktheserver.com/ssh-cant-connect-authentications-that-can-continue-publickeygssapi-keyexgssapi-with-micpassword/
2
Please add the essence of the solution into your answer. Link-only answers are susceptible to link rot.
– Deer Hunter
Apr 20 '15 at 6:11
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
– Mark Henderson♦
Apr 20 '15 at 6:26
thanks for your suggestions. I understand that a working link can be a '404 error' in future and it is important to mention the points in the answer itself. I have edited my answer as well.
– user173141
Apr 26 '15 at 5:45
@DeerHunter was prophetic: link rotted
– Riet
Feb 5 '16 at 23:34
@Riet - edit suggested. All is not lost. Meanwhile you can visit the captured copy of the page.
– Deer Hunter
Feb 5 '16 at 23:42
add a comment |
In my case, It was caused by encryption of the home directory. I have changed the location of the ssh keys and it resolved the issue : (Web Archive copy)
http://tweaktheserver.com/ssh-cant-connect-authentications-that-can-continue-publickeygssapi-keyexgssapi-with-micpassword/
In my case, It was caused by encryption of the home directory. I have changed the location of the ssh keys and it resolved the issue : (Web Archive copy)
http://tweaktheserver.com/ssh-cant-connect-authentications-that-can-continue-publickeygssapi-keyexgssapi-with-micpassword/
edited Feb 6 '16 at 20:41
Deer Hunter
90841625
90841625
answered Apr 20 '15 at 5:54
user173141user173141
6717
6717
2
Please add the essence of the solution into your answer. Link-only answers are susceptible to link rot.
– Deer Hunter
Apr 20 '15 at 6:11
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
– Mark Henderson♦
Apr 20 '15 at 6:26
thanks for your suggestions. I understand that a working link can be a '404 error' in future and it is important to mention the points in the answer itself. I have edited my answer as well.
– user173141
Apr 26 '15 at 5:45
@DeerHunter was prophetic: link rotted
– Riet
Feb 5 '16 at 23:34
@Riet - edit suggested. All is not lost. Meanwhile you can visit the captured copy of the page.
– Deer Hunter
Feb 5 '16 at 23:42
add a comment |
2
Please add the essence of the solution into your answer. Link-only answers are susceptible to link rot.
– Deer Hunter
Apr 20 '15 at 6:11
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
– Mark Henderson♦
Apr 20 '15 at 6:26
thanks for your suggestions. I understand that a working link can be a '404 error' in future and it is important to mention the points in the answer itself. I have edited my answer as well.
– user173141
Apr 26 '15 at 5:45
@DeerHunter was prophetic: link rotted
– Riet
Feb 5 '16 at 23:34
@Riet - edit suggested. All is not lost. Meanwhile you can visit the captured copy of the page.
– Deer Hunter
Feb 5 '16 at 23:42
2
2
Please add the essence of the solution into your answer. Link-only answers are susceptible to link rot.
– Deer Hunter
Apr 20 '15 at 6:11
Please add the essence of the solution into your answer. Link-only answers are susceptible to link rot.
– Deer Hunter
Apr 20 '15 at 6:11
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
– Mark Henderson♦
Apr 20 '15 at 6:26
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
– Mark Henderson♦
Apr 20 '15 at 6:26
thanks for your suggestions. I understand that a working link can be a '404 error' in future and it is important to mention the points in the answer itself. I have edited my answer as well.
– user173141
Apr 26 '15 at 5:45
thanks for your suggestions. I understand that a working link can be a '404 error' in future and it is important to mention the points in the answer itself. I have edited my answer as well.
– user173141
Apr 26 '15 at 5:45
@DeerHunter was prophetic: link rotted
– Riet
Feb 5 '16 at 23:34
@DeerHunter was prophetic: link rotted
– Riet
Feb 5 '16 at 23:34
@Riet - edit suggested. All is not lost. Meanwhile you can visit the captured copy of the page.
– Deer Hunter
Feb 5 '16 at 23:42
@Riet - edit suggested. All is not lost. Meanwhile you can visit the captured copy of the page.
– Deer Hunter
Feb 5 '16 at 23:42
add a comment |
GSSAPI authentication seems to be enabled in the client, yet it fails and falls back to password authentication. If you cannot login with supplied login and password, then the only sensible thing to do is to contact someone responsible for managing the server (the "company").
add a comment |
GSSAPI authentication seems to be enabled in the client, yet it fails and falls back to password authentication. If you cannot login with supplied login and password, then the only sensible thing to do is to contact someone responsible for managing the server (the "company").
add a comment |
GSSAPI authentication seems to be enabled in the client, yet it fails and falls back to password authentication. If you cannot login with supplied login and password, then the only sensible thing to do is to contact someone responsible for managing the server (the "company").
GSSAPI authentication seems to be enabled in the client, yet it fails and falls back to password authentication. If you cannot login with supplied login and password, then the only sensible thing to do is to contact someone responsible for managing the server (the "company").
answered May 23 '14 at 11:51
phoopsphoops
1,78341523
1,78341523
add a comment |
add a comment |
I had the same problem, but the issue for me was that the default configuration of the operating system (CentOS 7) was to encrypt the user directory, so that the authorized_keys file placed in ~/.ssh/ would not work. The solution came from here but basically:
- in
/etc/ssh/sshd_configset the AuthorizedKeysFile property to something outside of the user's directory (/etc/ssh/authorized_keys) - restart the sshd service
add a comment |
I had the same problem, but the issue for me was that the default configuration of the operating system (CentOS 7) was to encrypt the user directory, so that the authorized_keys file placed in ~/.ssh/ would not work. The solution came from here but basically:
- in
/etc/ssh/sshd_configset the AuthorizedKeysFile property to something outside of the user's directory (/etc/ssh/authorized_keys) - restart the sshd service
add a comment |
I had the same problem, but the issue for me was that the default configuration of the operating system (CentOS 7) was to encrypt the user directory, so that the authorized_keys file placed in ~/.ssh/ would not work. The solution came from here but basically:
- in
/etc/ssh/sshd_configset the AuthorizedKeysFile property to something outside of the user's directory (/etc/ssh/authorized_keys) - restart the sshd service
I had the same problem, but the issue for me was that the default configuration of the operating system (CentOS 7) was to encrypt the user directory, so that the authorized_keys file placed in ~/.ssh/ would not work. The solution came from here but basically:
- in
/etc/ssh/sshd_configset the AuthorizedKeysFile property to something outside of the user's directory (/etc/ssh/authorized_keys) - restart the sshd service
answered Aug 18 '15 at 0:25
Anatoly GeyfmanAnatoly Geyfman
112
112
add a comment |
add a comment |
try:
ssh server -p port -o PreferredAuthentications=publickey
please be a little more verbose about why the OP should use your command and what it does. also usingcode stylingfor commands is deemed good style:``
– Phillip -Zyan K Lee- Stockmann
May 1 at 19:26
add a comment |
try:
ssh server -p port -o PreferredAuthentications=publickey
please be a little more verbose about why the OP should use your command and what it does. also usingcode stylingfor commands is deemed good style:``
– Phillip -Zyan K Lee- Stockmann
May 1 at 19:26
add a comment |
try:
ssh server -p port -o PreferredAuthentications=publickey
try:
ssh server -p port -o PreferredAuthentications=publickey
answered May 1 at 12:30
Alexandr VladimirovichAlexandr Vladimirovich
1
1
please be a little more verbose about why the OP should use your command and what it does. also usingcode stylingfor commands is deemed good style:``
– Phillip -Zyan K Lee- Stockmann
May 1 at 19:26
add a comment |
please be a little more verbose about why the OP should use your command and what it does. also usingcode stylingfor commands is deemed good style:``
– Phillip -Zyan K Lee- Stockmann
May 1 at 19:26
please be a little more verbose about why the OP should use your command and what it does. also using
code styling for commands is deemed good style: ``– Phillip -Zyan K Lee- Stockmann
May 1 at 19:26
please be a little more verbose about why the OP should use your command and what it does. also using
code styling for commands is deemed good style: ``– Phillip -Zyan K Lee- Stockmann
May 1 at 19:26
add a comment |
I needed to give /home/ec2-user permissions 700:
chmod -R 700 /home/ec2-user/
Why the vote to delete?
– duhaime
Nov 7 '18 at 21:23
add a comment |
I needed to give /home/ec2-user permissions 700:
chmod -R 700 /home/ec2-user/
Why the vote to delete?
– duhaime
Nov 7 '18 at 21:23
add a comment |
I needed to give /home/ec2-user permissions 700:
chmod -R 700 /home/ec2-user/
I needed to give /home/ec2-user permissions 700:
chmod -R 700 /home/ec2-user/
answered Jun 29 '18 at 17:31
duhaimeduhaime
993
993
Why the vote to delete?
– duhaime
Nov 7 '18 at 21:23
add a comment |
Why the vote to delete?
– duhaime
Nov 7 '18 at 21:23
Why the vote to delete?
– duhaime
Nov 7 '18 at 21:23
Why the vote to delete?
– duhaime
Nov 7 '18 at 21:23
add a comment |
Let me add that you should ensure that the key belongs to your user.
Type ls -la to see which user your key belongs to.
You can change the ownership:
sudo chown ubuntu:root myKey //If you are using ubuntu.
Also ensure:
- You are using the correct
.pemkey if using linux (putty is different) - You have set the correct key permissions:
sudo chmod 400 mykey.pem - You are using the correct username:
ssh -i mykey user@instanceip
add a comment |
Let me add that you should ensure that the key belongs to your user.
Type ls -la to see which user your key belongs to.
You can change the ownership:
sudo chown ubuntu:root myKey //If you are using ubuntu.
Also ensure:
- You are using the correct
.pemkey if using linux (putty is different) - You have set the correct key permissions:
sudo chmod 400 mykey.pem - You are using the correct username:
ssh -i mykey user@instanceip
add a comment |
Let me add that you should ensure that the key belongs to your user.
Type ls -la to see which user your key belongs to.
You can change the ownership:
sudo chown ubuntu:root myKey //If you are using ubuntu.
Also ensure:
- You are using the correct
.pemkey if using linux (putty is different) - You have set the correct key permissions:
sudo chmod 400 mykey.pem - You are using the correct username:
ssh -i mykey user@instanceip
Let me add that you should ensure that the key belongs to your user.
Type ls -la to see which user your key belongs to.
You can change the ownership:
sudo chown ubuntu:root myKey //If you are using ubuntu.
Also ensure:
- You are using the correct
.pemkey if using linux (putty is different) - You have set the correct key permissions:
sudo chmod 400 mykey.pem - You are using the correct username:
ssh -i mykey user@instanceip
edited Nov 7 '18 at 19:10
alexander.polomodov
1,0503712
1,0503712
answered Nov 7 '18 at 14:48
JPaulinoJPaulino
99
99
add a comment |
add a comment |
You can try
ssh server -l user -o "PubkeyAuthentication=no"
OR in /etc/ssh/sshd_config, add/modify the property
PermitRootLogin yes
ssh server -l user -o "PubkeyAuthentication=no"equalssh user@server -o "PubkeyAuthentication=no"
– Adriano
Apr 11 '17 at 12:03
add a comment |
You can try
ssh server -l user -o "PubkeyAuthentication=no"
OR in /etc/ssh/sshd_config, add/modify the property
PermitRootLogin yes
ssh server -l user -o "PubkeyAuthentication=no"equalssh user@server -o "PubkeyAuthentication=no"
– Adriano
Apr 11 '17 at 12:03
add a comment |
You can try
ssh server -l user -o "PubkeyAuthentication=no"
OR in /etc/ssh/sshd_config, add/modify the property
PermitRootLogin yes
You can try
ssh server -l user -o "PubkeyAuthentication=no"
OR in /etc/ssh/sshd_config, add/modify the property
PermitRootLogin yes
answered Apr 11 '17 at 12:03
AdrianoAdriano
972
972
ssh server -l user -o "PubkeyAuthentication=no"equalssh user@server -o "PubkeyAuthentication=no"
– Adriano
Apr 11 '17 at 12:03
add a comment |
ssh server -l user -o "PubkeyAuthentication=no"equalssh user@server -o "PubkeyAuthentication=no"
– Adriano
Apr 11 '17 at 12:03
ssh server -l user -o "PubkeyAuthentication=no" equal ssh user@server -o "PubkeyAuthentication=no"– Adriano
Apr 11 '17 at 12:03
ssh server -l user -o "PubkeyAuthentication=no" equal ssh user@server -o "PubkeyAuthentication=no"– Adriano
Apr 11 '17 at 12:03
add a comment |
$ ssh Vagrant@192.168.33.11 -i .vagrant/machines/default/virtualbox/private_key
This worked for me
add a comment |
$ ssh Vagrant@192.168.33.11 -i .vagrant/machines/default/virtualbox/private_key
This worked for me
add a comment |
$ ssh Vagrant@192.168.33.11 -i .vagrant/machines/default/virtualbox/private_key
This worked for me
$ ssh Vagrant@192.168.33.11 -i .vagrant/machines/default/virtualbox/private_key
This worked for me
answered Mar 18 at 15:30
karthik brkarthik br
1
1
add a comment |
add a comment |
protected by womble♦ May 1 at 23:22
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
is the username "ff" on host 2 correct?
– etagenklo
May 23 '14 at 11:52
@etagenklo yeah that's what I was given.
– gherkin
May 23 '14 at 12:21
You should ask the administrator of
host2.– jornane
May 23 '14 at 16:25
I had the same issue. I think the cause is that I had something set up wrong in the user's $HOME/.ssh folder. After mv $HOME/.ssh $HOME/.ssh.hide I could log in using ssh password
– JackBauer35
May 27 '15 at 20:51