Portal Home > Knowledgebase > Articles Database > SSH Error: Permission denied (publickey,gssapi-with-mic)


SSH Error: Permission denied (publickey,gssapi-with-mic)




Posted by Rafal_A, 12-22-2006, 06:04 PM
Fedora Core 5 ------------------ Hello, I have SSH Error: Permission denied (publickey,gssapi-with-mic) Could you tell me what files should I sent (for example from my other server) to overwrite? I cant access to server and I didnt touch SSH config files. Hacker? Error? Please help! root@s2 [/]# ssh -v s6.domain.com OpenSSH_4.2p1, OpenSSL 0.9.7f 22 Mar 2005 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to s6.icm.pl [66.90.121.153] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/id_rsa type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3 debug1: match: OpenSSH_4.3 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.2 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 's6.icm.pl' is known and matches the RSA host key. debug1: Found key in /root/.ssh/known_hosts:11 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 debug1: Next authentication method: gssapi-with-mic debug1: Authentications that can continue: publickey,gssapi-with-mic debug1: Authentications that can continue: publickey,gssapi-with-mic debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug1: Trying private key: /root/.ssh/id_rsa debug1: Trying private key: /root/.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey,gssapi-with-mic). root@s2 [/]#

Posted by viren, 05-07-2009, 05:16 AM
make sure that the *right* permissions are set up drwx------ 2 virender virender 4096 May 7 04:51 .ssh -rw------- 1 virender virender 393 May 7 03:41 .ssh/authorized_keys

Posted by Rafal_A, 05-07-2009, 08:50 AM
That was 3 years ago but thanks Now I know linux better and I dont look for help :-)

Posted by yuvilio, 11-05-2009, 05:46 PM
After setting up the proper sshd_config and seeing this issue i was frustrated. But I then adjusted the perms as viren showed and that fixed it! Thanks viren!!!

Posted by virtuewise, 03-14-2012, 05:22 PM
The information on setting the permissions ended hours of my frustations.... On RedHat (bash): #Create Keys $: ssh-keygen -t rsa #Move created id_rsa.pub file to target server - I used sftp $: sftp username@server2.mycompany.com $: sftp> put $HOME/.ssh/*.pub $HOME/.ssh/authorized_keys # Change the permissions on the .ssh file to be the same # as mentioned in the post above (Again, Thank You!) #The directory .ssh: $: chmod u=rwx $HOME/.ssh $: ls -al drwx------ .ssh #The file authorized_keys: $: chmod u=rw $home/.ssh/authorized_keys $: ls -al -rw------- authorized_keys # register the keys using ssh-agent and ssh-add $: exec ssh-agent bash $: ssh-add #Start using your connection (here I use scp to copy file #in batch mode(does not prompt for username/password) scp -B $HOME/some_directory/* myuser@server2.mycompany.com:/disk1/some_other_directory/



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
We3cares.com (Views: 803)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.