Why is my SSH connection being closed immediately after pubkey auth succeeds? Announcing the...

How do I find out the mythology and history of my Fortress?

How does the math work when buying airline miles?

Is it a good idea to use CNN to classify 1D signal?

Can anything be seen from the center of the Boötes void? How dark would it be?

Is CEO the profession with the most psychopaths?

Can you use the Shield Master feat to shove someone before you make an attack by using a Readied action?

Delete nth line from bottom

8 Prisoners wearing hats

Is it fair for a professor to grade us on the possession of past papers?

Is there any way for the UK Prime Minister to make a motion directly dependent on Government confidence?

How do pianists reach extremely loud dynamics?

Crossing US/Canada Border for less than 24 hours

Trademark violation for app?

Would "destroying" Wurmcoil Engine prevent its tokens from being created?

Why are both D and D# fitting into my E minor key?

How to answer "Have you ever been terminated?"

For a new assistant professor in CS, how to build/manage a publication pipeline

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?

How do I stop a creek from eroding my steep embankment?

Is there such thing as an Availability Group failover trigger?

What causes the direction of lightning flashes?

How to react to hostile behavior from a senior developer?

How can I use the Python library networkx from Mathematica?

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?



Why is my SSH connection being closed immediately after pubkey auth succeeds?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionCan't log into localhost via SSH, but authentication succeededWhy is my ssh connection unauthorized although I have updated my key on the remote machine?ssh connection to server closed immediately after authenticationSSH - Connection closed after correct loginSSH pageant not workingSSH Remote Execution - checking server can do it?SSH Configuration Help / Can't tunnelAws ec2 - How to rsync files between two remotes?SSH “No supported authentication methods available”passwordless ssh to localhost in Ubuntu 16.04passwordless ssh connection does not work after migrating to an new client





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







6















I've two windows machine and trying to SSH using CYGWIN. It works fine when password prompted. However, when I generated the private/public pair, looks like authentication succeeded, but got the connection closed error.



Here's the detail logs: Please help




debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/502537203/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug1: Authentication succeeded (publickey).
Authenticated to hostname ([x.x.x.x]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: send packet: type 1
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t3 r-1 i0/0 o0/0 fd 4/5 cc -1)

Connection to hostname closed by remote host.
Connection to hostname closed.
Transferred: sent 2056, received 1500 bytes, in 0.0 seconds
debug1: Exit status -1









share|improve this question

























  • I generated this log via ssh -vvv to the remote server and also placed the authorized_keys as well

    – Kamal
    Nov 16 '16 at 18:34






  • 1





    You're doing your part just fine, it's the remote server that closes the connection. Look at the logs of the remote machine.

    – Satō Katsura
    Nov 16 '16 at 18:42













  • In which location of the server, I need to check for logs.

    – Kamal
    Nov 16 '16 at 19:11











  • Check under cygwinvarlogmessages

    – stark
    Nov 16 '16 at 19:14











  • I've only below four files under /var/log -> setup.log, setup.log.full, sshd.log (no data), lastlog (huge data). Which one to check?

    – Kamal
    Nov 16 '16 at 19:22




















6















I've two windows machine and trying to SSH using CYGWIN. It works fine when password prompted. However, when I generated the private/public pair, looks like authentication succeeded, but got the connection closed error.



Here's the detail logs: Please help




debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/502537203/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug1: Authentication succeeded (publickey).
Authenticated to hostname ([x.x.x.x]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: send packet: type 1
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t3 r-1 i0/0 o0/0 fd 4/5 cc -1)

Connection to hostname closed by remote host.
Connection to hostname closed.
Transferred: sent 2056, received 1500 bytes, in 0.0 seconds
debug1: Exit status -1









share|improve this question

























  • I generated this log via ssh -vvv to the remote server and also placed the authorized_keys as well

    – Kamal
    Nov 16 '16 at 18:34






  • 1





    You're doing your part just fine, it's the remote server that closes the connection. Look at the logs of the remote machine.

    – Satō Katsura
    Nov 16 '16 at 18:42













  • In which location of the server, I need to check for logs.

    – Kamal
    Nov 16 '16 at 19:11











  • Check under cygwinvarlogmessages

    – stark
    Nov 16 '16 at 19:14











  • I've only below four files under /var/log -> setup.log, setup.log.full, sshd.log (no data), lastlog (huge data). Which one to check?

    – Kamal
    Nov 16 '16 at 19:22
















6












6








6








I've two windows machine and trying to SSH using CYGWIN. It works fine when password prompted. However, when I generated the private/public pair, looks like authentication succeeded, but got the connection closed error.



Here's the detail logs: Please help




debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/502537203/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug1: Authentication succeeded (publickey).
Authenticated to hostname ([x.x.x.x]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: send packet: type 1
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t3 r-1 i0/0 o0/0 fd 4/5 cc -1)

Connection to hostname closed by remote host.
Connection to hostname closed.
Transferred: sent 2056, received 1500 bytes, in 0.0 seconds
debug1: Exit status -1









share|improve this question
















I've two windows machine and trying to SSH using CYGWIN. It works fine when password prompted. However, when I generated the private/public pair, looks like authentication succeeded, but got the connection closed error.



Here's the detail logs: Please help




debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/502537203/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug1: Authentication succeeded (publickey).
Authenticated to hostname ([x.x.x.x]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: send packet: type 1
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t3 r-1 i0/0 o0/0 fd 4/5 cc -1)

Connection to hostname closed by remote host.
Connection to hostname closed.
Transferred: sent 2056, received 1500 bytes, in 0.0 seconds
debug1: Exit status -1






ssh sshd cygwin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '16 at 18:40









jayhendren

5,49721646




5,49721646










asked Nov 16 '16 at 18:33









KamalKamal

6116




6116













  • I generated this log via ssh -vvv to the remote server and also placed the authorized_keys as well

    – Kamal
    Nov 16 '16 at 18:34






  • 1





    You're doing your part just fine, it's the remote server that closes the connection. Look at the logs of the remote machine.

    – Satō Katsura
    Nov 16 '16 at 18:42













  • In which location of the server, I need to check for logs.

    – Kamal
    Nov 16 '16 at 19:11











  • Check under cygwinvarlogmessages

    – stark
    Nov 16 '16 at 19:14











  • I've only below four files under /var/log -> setup.log, setup.log.full, sshd.log (no data), lastlog (huge data). Which one to check?

    – Kamal
    Nov 16 '16 at 19:22





















  • I generated this log via ssh -vvv to the remote server and also placed the authorized_keys as well

    – Kamal
    Nov 16 '16 at 18:34






  • 1





    You're doing your part just fine, it's the remote server that closes the connection. Look at the logs of the remote machine.

    – Satō Katsura
    Nov 16 '16 at 18:42













  • In which location of the server, I need to check for logs.

    – Kamal
    Nov 16 '16 at 19:11











  • Check under cygwinvarlogmessages

    – stark
    Nov 16 '16 at 19:14











  • I've only below four files under /var/log -> setup.log, setup.log.full, sshd.log (no data), lastlog (huge data). Which one to check?

    – Kamal
    Nov 16 '16 at 19:22



















I generated this log via ssh -vvv to the remote server and also placed the authorized_keys as well

– Kamal
Nov 16 '16 at 18:34





I generated this log via ssh -vvv to the remote server and also placed the authorized_keys as well

– Kamal
Nov 16 '16 at 18:34




1




1





You're doing your part just fine, it's the remote server that closes the connection. Look at the logs of the remote machine.

– Satō Katsura
Nov 16 '16 at 18:42







You're doing your part just fine, it's the remote server that closes the connection. Look at the logs of the remote machine.

– Satō Katsura
Nov 16 '16 at 18:42















In which location of the server, I need to check for logs.

– Kamal
Nov 16 '16 at 19:11





In which location of the server, I need to check for logs.

– Kamal
Nov 16 '16 at 19:11













Check under cygwinvarlogmessages

– stark
Nov 16 '16 at 19:14





Check under cygwinvarlogmessages

– stark
Nov 16 '16 at 19:14













I've only below four files under /var/log -> setup.log, setup.log.full, sshd.log (no data), lastlog (huge data). Which one to check?

– Kamal
Nov 16 '16 at 19:22







I've only below four files under /var/log -> setup.log, setup.log.full, sshd.log (no data), lastlog (huge data). Which one to check?

– Kamal
Nov 16 '16 at 19:22












2 Answers
2






active

oldest

votes


















3














It's working now. I did the following




  1. set the permission for ~/.ssh 700

  2. all the files under ~/.ssh 600

  3. run the sshd service as cyg_server id (created during ssh-host-config)

  4. edited /etc/sshd_config to allow PubkeyAuthentication yes






share|improve this answer

































    0














    Incompatible ciphers can get negotiated. Try this:



    ssh -oCiphers=aes128-ctr user@host



    http://developer.toradex.com/knowledge-base/ssh#incompatible-cipher-support






    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',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      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%2f323776%2fwhy-is-my-ssh-connection-being-closed-immediately-after-pubkey-auth-succeeds%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      It's working now. I did the following




      1. set the permission for ~/.ssh 700

      2. all the files under ~/.ssh 600

      3. run the sshd service as cyg_server id (created during ssh-host-config)

      4. edited /etc/sshd_config to allow PubkeyAuthentication yes






      share|improve this answer






























        3














        It's working now. I did the following




        1. set the permission for ~/.ssh 700

        2. all the files under ~/.ssh 600

        3. run the sshd service as cyg_server id (created during ssh-host-config)

        4. edited /etc/sshd_config to allow PubkeyAuthentication yes






        share|improve this answer




























          3












          3








          3







          It's working now. I did the following




          1. set the permission for ~/.ssh 700

          2. all the files under ~/.ssh 600

          3. run the sshd service as cyg_server id (created during ssh-host-config)

          4. edited /etc/sshd_config to allow PubkeyAuthentication yes






          share|improve this answer















          It's working now. I did the following




          1. set the permission for ~/.ssh 700

          2. all the files under ~/.ssh 600

          3. run the sshd service as cyg_server id (created during ssh-host-config)

          4. edited /etc/sshd_config to allow PubkeyAuthentication yes







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 7 hours ago









          Rui F Ribeiro

          42.1k1484142




          42.1k1484142










          answered Nov 18 '16 at 20:39









          KamalKamal

          6116




          6116

























              0














              Incompatible ciphers can get negotiated. Try this:



              ssh -oCiphers=aes128-ctr user@host



              http://developer.toradex.com/knowledge-base/ssh#incompatible-cipher-support






              share|improve this answer




























                0














                Incompatible ciphers can get negotiated. Try this:



                ssh -oCiphers=aes128-ctr user@host



                http://developer.toradex.com/knowledge-base/ssh#incompatible-cipher-support






                share|improve this answer


























                  0












                  0








                  0







                  Incompatible ciphers can get negotiated. Try this:



                  ssh -oCiphers=aes128-ctr user@host



                  http://developer.toradex.com/knowledge-base/ssh#incompatible-cipher-support






                  share|improve this answer













                  Incompatible ciphers can get negotiated. Try this:



                  ssh -oCiphers=aes128-ctr user@host



                  http://developer.toradex.com/knowledge-base/ssh#incompatible-cipher-support







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 19 '17 at 5:38









                  Tim OlsonTim Olson

                  91




                  91






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f323776%2fwhy-is-my-ssh-connection-being-closed-immediately-after-pubkey-auth-succeeds%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                      Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                      Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m