Permission denied (publickey) on ubuntu 16.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












$ ssh mykey.pem ubuntu@10.128.2.7 -v
OpenSSH_7.3p1, OpenSSL 1.0.2j 26 Sep 2016
debug1: Reading configuration data /c/Users/works/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 10.128.2.7 [10.128.2.7] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to 10.128.2.7:22 as 'ubuntu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:R+d2ELtCJyoeyHMfivCsGKk98GOIfxxsTEPAFmKkSOI
debug1: Host '10.128.2.7' is known and matches the ECDSA host key.
debug1: Found key in /c/Users/works/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).


I used to be able to ssh into this machine until yesterday.
Is there a way to login into it?







share|improve this question






















  • Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?
    – Stefan M
    Feb 8 at 8:01










  • What you are saying is possible. Is there a way to put it back in place? I am running the instance on openstack.
    – user3288346
    Feb 8 at 8:12














up vote
0
down vote

favorite












$ ssh mykey.pem ubuntu@10.128.2.7 -v
OpenSSH_7.3p1, OpenSSL 1.0.2j 26 Sep 2016
debug1: Reading configuration data /c/Users/works/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 10.128.2.7 [10.128.2.7] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to 10.128.2.7:22 as 'ubuntu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:R+d2ELtCJyoeyHMfivCsGKk98GOIfxxsTEPAFmKkSOI
debug1: Host '10.128.2.7' is known and matches the ECDSA host key.
debug1: Found key in /c/Users/works/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).


I used to be able to ssh into this machine until yesterday.
Is there a way to login into it?







share|improve this question






















  • Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?
    – Stefan M
    Feb 8 at 8:01










  • What you are saying is possible. Is there a way to put it back in place? I am running the instance on openstack.
    – user3288346
    Feb 8 at 8:12












up vote
0
down vote

favorite









up vote
0
down vote

favorite











$ ssh mykey.pem ubuntu@10.128.2.7 -v
OpenSSH_7.3p1, OpenSSL 1.0.2j 26 Sep 2016
debug1: Reading configuration data /c/Users/works/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 10.128.2.7 [10.128.2.7] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to 10.128.2.7:22 as 'ubuntu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:R+d2ELtCJyoeyHMfivCsGKk98GOIfxxsTEPAFmKkSOI
debug1: Host '10.128.2.7' is known and matches the ECDSA host key.
debug1: Found key in /c/Users/works/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).


I used to be able to ssh into this machine until yesterday.
Is there a way to login into it?







share|improve this question














$ ssh mykey.pem ubuntu@10.128.2.7 -v
OpenSSH_7.3p1, OpenSSL 1.0.2j 26 Sep 2016
debug1: Reading configuration data /c/Users/works/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 10.128.2.7 [10.128.2.7] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to 10.128.2.7:22 as 'ubuntu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:R+d2ELtCJyoeyHMfivCsGKk98GOIfxxsTEPAFmKkSOI
debug1: Host '10.128.2.7' is known and matches the ECDSA host key.
debug1: Found key in /c/Users/works/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).


I used to be able to ssh into this machine until yesterday.
Is there a way to login into it?









share|improve this question













share|improve this question




share|improve this question








edited Feb 8 at 8:12

























asked Feb 8 at 7:41









user3288346

1335




1335











  • Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?
    – Stefan M
    Feb 8 at 8:01










  • What you are saying is possible. Is there a way to put it back in place? I am running the instance on openstack.
    – user3288346
    Feb 8 at 8:12
















  • Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?
    – Stefan M
    Feb 8 at 8:01










  • What you are saying is possible. Is there a way to put it back in place? I am running the instance on openstack.
    – user3288346
    Feb 8 at 8:12















Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?
– Stefan M
Feb 8 at 8:01




Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?
– Stefan M
Feb 8 at 8:01












What you are saying is possible. Is there a way to put it back in place? I am running the instance on openstack.
– user3288346
Feb 8 at 8:12




What you are saying is possible. Is there a way to put it back in place? I am running the instance on openstack.
– user3288346
Feb 8 at 8:12










2 Answers
2






active

oldest

votes

















up vote
0
down vote













Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?



If you deleted the information, you won't be available to log into the server again, if you don't have physical access to the disk.



This is basic ssh security, if you don't have the appropriate key which is mentioned in the .ssh/authorized_keys, you don't get access. That way you make sure that noone else can easily access your server.






share|improve this answer



























    up vote
    0
    down vote













    $ ssh mykey.pem ubuntu@10.128.2.7 -v
    ...
    debug1: key_load_public: No such file or directory
    debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
    ...
    debug1: Next authentication method: publickey
    debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
    debug1: Authentications that can continue: publickey


    The only key which your client tried to use is ifx_key.pem. It looks like that file isn't actually present (the "type -1" line). If that's the key which ssh is supposed to authenticate with, make sure the file is actually present on your local system and that you have permission to read it.



    $ ssh mykey.pem ubuntu@10.128.2.7 -v


    This suggests that you want ssh to use a different key file named mykey.pem, but you didn't specify the command correctly. To specify a key on the command line, use the -i option:



    $ ssh -i mykey.pem ubuntu@10.128.2.7 -v





    share|improve this answer




















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f422725%2fpermission-denied-publickey-on-ubuntu-16-04%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?



      If you deleted the information, you won't be available to log into the server again, if you don't have physical access to the disk.



      This is basic ssh security, if you don't have the appropriate key which is mentioned in the .ssh/authorized_keys, you don't get access. That way you make sure that noone else can easily access your server.






      share|improve this answer
























        up vote
        0
        down vote













        Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?



        If you deleted the information, you won't be available to log into the server again, if you don't have physical access to the disk.



        This is basic ssh security, if you don't have the appropriate key which is mentioned in the .ssh/authorized_keys, you don't get access. That way you make sure that noone else can easily access your server.






        share|improve this answer






















          up vote
          0
          down vote










          up vote
          0
          down vote









          Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?



          If you deleted the information, you won't be available to log into the server again, if you don't have physical access to the disk.



          This is basic ssh security, if you don't have the appropriate key which is mentioned in the .ssh/authorized_keys, you don't get access. That way you make sure that noone else can easily access your server.






          share|improve this answer












          Only if you have a private key that is reference to in the .ssh/authorized_keys on the server. Have you deleted that file or altered its contents?



          If you deleted the information, you won't be available to log into the server again, if you don't have physical access to the disk.



          This is basic ssh security, if you don't have the appropriate key which is mentioned in the .ssh/authorized_keys, you don't get access. That way you make sure that noone else can easily access your server.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 8 at 8:34









          Stefan M

          8101617




          8101617






















              up vote
              0
              down vote













              $ ssh mykey.pem ubuntu@10.128.2.7 -v
              ...
              debug1: key_load_public: No such file or directory
              debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
              debug1: key_load_public: No such file or directory
              debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
              ...
              debug1: Next authentication method: publickey
              debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
              debug1: Authentications that can continue: publickey


              The only key which your client tried to use is ifx_key.pem. It looks like that file isn't actually present (the "type -1" line). If that's the key which ssh is supposed to authenticate with, make sure the file is actually present on your local system and that you have permission to read it.



              $ ssh mykey.pem ubuntu@10.128.2.7 -v


              This suggests that you want ssh to use a different key file named mykey.pem, but you didn't specify the command correctly. To specify a key on the command line, use the -i option:



              $ ssh -i mykey.pem ubuntu@10.128.2.7 -v





              share|improve this answer
























                up vote
                0
                down vote













                $ ssh mykey.pem ubuntu@10.128.2.7 -v
                ...
                debug1: key_load_public: No such file or directory
                debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
                debug1: key_load_public: No such file or directory
                debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
                ...
                debug1: Next authentication method: publickey
                debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
                debug1: Authentications that can continue: publickey


                The only key which your client tried to use is ifx_key.pem. It looks like that file isn't actually present (the "type -1" line). If that's the key which ssh is supposed to authenticate with, make sure the file is actually present on your local system and that you have permission to read it.



                $ ssh mykey.pem ubuntu@10.128.2.7 -v


                This suggests that you want ssh to use a different key file named mykey.pem, but you didn't specify the command correctly. To specify a key on the command line, use the -i option:



                $ ssh -i mykey.pem ubuntu@10.128.2.7 -v





                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  $ ssh mykey.pem ubuntu@10.128.2.7 -v
                  ...
                  debug1: key_load_public: No such file or directory
                  debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
                  debug1: key_load_public: No such file or directory
                  debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
                  ...
                  debug1: Next authentication method: publickey
                  debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
                  debug1: Authentications that can continue: publickey


                  The only key which your client tried to use is ifx_key.pem. It looks like that file isn't actually present (the "type -1" line). If that's the key which ssh is supposed to authenticate with, make sure the file is actually present on your local system and that you have permission to read it.



                  $ ssh mykey.pem ubuntu@10.128.2.7 -v


                  This suggests that you want ssh to use a different key file named mykey.pem, but you didn't specify the command correctly. To specify a key on the command line, use the -i option:



                  $ ssh -i mykey.pem ubuntu@10.128.2.7 -v





                  share|improve this answer












                  $ ssh mykey.pem ubuntu@10.128.2.7 -v
                  ...
                  debug1: key_load_public: No such file or directory
                  debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
                  debug1: key_load_public: No such file or directory
                  debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
                  ...
                  debug1: Next authentication method: publickey
                  debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
                  debug1: Authentications that can continue: publickey


                  The only key which your client tried to use is ifx_key.pem. It looks like that file isn't actually present (the "type -1" line). If that's the key which ssh is supposed to authenticate with, make sure the file is actually present on your local system and that you have permission to read it.



                  $ ssh mykey.pem ubuntu@10.128.2.7 -v


                  This suggests that you want ssh to use a different key file named mykey.pem, but you didn't specify the command correctly. To specify a key on the command line, use the -i option:



                  $ ssh -i mykey.pem ubuntu@10.128.2.7 -v






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 8 at 14:29









                  Kenster

                  1,3281611




                  1,3281611






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f422725%2fpermission-denied-publickey-on-ubuntu-16-04%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Bahrain

                      Postfix configuration issue with fips on centos 7; mailgun relay