Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2006
    Posts
    72

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

    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 [/]#

  2. #2

    check your permissions

    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

  3. #3
    Join Date
    Feb 2006
    Posts
    72
    That was 3 years ago but thanks


    Now I know linux better and I dont look for help :-)

  4. #4

    solution verified

    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!!!

  5. #5

    Thumbs up Thank you....Thank you...Thank you.....


    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/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •