SSH Server Public Key Too SmallDebian jessie upgrade OpenSSH server to latestCreate a public SSH key from the...

Is there a German word for “analytics”?

Where was Karl Mordo in Infinity War?

If a druid in Wild Shape swallows a creature whole, then turns back to her normal form, what happens?

Can you use a beast's innate abilities while polymorphed?

How to approximate rolls for potions of healing using only d6's?

Reason Why Dimensional Travelling Would be Restricted

What is the wife of a henpecked husband called?

Compare four integers, return word based on maximum

Understanding Kramnik's play in game 1 of Candidates 2018

What if I store 10TB on azure servers and then keep the vm powered off?

Is there a better way to make addon working on both blender 2.80 and 2.79?

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

Is divide-by-zero a security vulnerability?

Why proton concentration is divided by 10⁻⁷?

How do I construct an nxn matrix?

What is the difference between throw e and throw new Exception(e)?

Could quantum mechanics be necessary to analyze some biology scenarios?

Sometimes a banana is just a banana

The change directory (cd) command is not working with a USB drive

Does music exist in Panem? And if so, what kinds of music?

What is this waxed root vegetable?

Exponential growth/decay formula: what happened to the other constant of integration?

How do I implement simple JS code to deploy a compiled smart contract to ganache-cli?

Has the Isbell–Freyd criterion ever been used to check that a category is concretisable?



SSH Server Public Key Too Small


Debian jessie upgrade OpenSSH server to latestCreate a public SSH key from the private key?Can't get SSH public key authentication to workssh authentication nfsHow do I tell Git for Windows where to find my private RSA key?How to automate SSH login with password?ssh returns “Bad owner or permissions on ~/.ssh/config”SSH public key authentication issueSSH Public Key FormatAdd comment to existing SSH public keyBest current authentication cipher for SSH2? Are certain ones only allowed/not allowed? How to tell what cipher an existing key is?













1















Customer has vendor who generates a Scan for PCI compliance on their Debian 8 server.



Taken from their report:




DSA keys and RSA keys shorter than 2048 bits are considered
vulnerable. It is recommended to install a RSA public key length of at
least 2048 bits or greater, or to switch to ECDSA or EdDSA.




Most of my search returns how to deal with ssh as a client. Of the few that obliquely touch on hardening this server suggest that I look to alter the /etc/ssh/ssh_config.



Even though it is said to be out of date, I ran ssh-audit from my local and it provided some suggestions to remove some of the keys, mac and hex. Seeing the vendor's report I commented out



#HostKey /etc/ssh/ssh_host_ecdsa_key



and restarted the ssh.service and re-ran the ssh-audit from local, which didn't seem to change its list of recommendations suggesting that I've not done something right.



I suspect I'm not doing the right thing to resolve this for my customer. What should I be doing instead?



This is a follow-on to showing PCI vendor that Debian 8 has been successfully patched.










share|improve this question



























    1















    Customer has vendor who generates a Scan for PCI compliance on their Debian 8 server.



    Taken from their report:




    DSA keys and RSA keys shorter than 2048 bits are considered
    vulnerable. It is recommended to install a RSA public key length of at
    least 2048 bits or greater, or to switch to ECDSA or EdDSA.




    Most of my search returns how to deal with ssh as a client. Of the few that obliquely touch on hardening this server suggest that I look to alter the /etc/ssh/ssh_config.



    Even though it is said to be out of date, I ran ssh-audit from my local and it provided some suggestions to remove some of the keys, mac and hex. Seeing the vendor's report I commented out



    #HostKey /etc/ssh/ssh_host_ecdsa_key



    and restarted the ssh.service and re-ran the ssh-audit from local, which didn't seem to change its list of recommendations suggesting that I've not done something right.



    I suspect I'm not doing the right thing to resolve this for my customer. What should I be doing instead?



    This is a follow-on to showing PCI vendor that Debian 8 has been successfully patched.










    share|improve this question

























      1












      1








      1








      Customer has vendor who generates a Scan for PCI compliance on their Debian 8 server.



      Taken from their report:




      DSA keys and RSA keys shorter than 2048 bits are considered
      vulnerable. It is recommended to install a RSA public key length of at
      least 2048 bits or greater, or to switch to ECDSA or EdDSA.




      Most of my search returns how to deal with ssh as a client. Of the few that obliquely touch on hardening this server suggest that I look to alter the /etc/ssh/ssh_config.



      Even though it is said to be out of date, I ran ssh-audit from my local and it provided some suggestions to remove some of the keys, mac and hex. Seeing the vendor's report I commented out



      #HostKey /etc/ssh/ssh_host_ecdsa_key



      and restarted the ssh.service and re-ran the ssh-audit from local, which didn't seem to change its list of recommendations suggesting that I've not done something right.



      I suspect I'm not doing the right thing to resolve this for my customer. What should I be doing instead?



      This is a follow-on to showing PCI vendor that Debian 8 has been successfully patched.










      share|improve this question














      Customer has vendor who generates a Scan for PCI compliance on their Debian 8 server.



      Taken from their report:




      DSA keys and RSA keys shorter than 2048 bits are considered
      vulnerable. It is recommended to install a RSA public key length of at
      least 2048 bits or greater, or to switch to ECDSA or EdDSA.




      Most of my search returns how to deal with ssh as a client. Of the few that obliquely touch on hardening this server suggest that I look to alter the /etc/ssh/ssh_config.



      Even though it is said to be out of date, I ran ssh-audit from my local and it provided some suggestions to remove some of the keys, mac and hex. Seeing the vendor's report I commented out



      #HostKey /etc/ssh/ssh_host_ecdsa_key



      and restarted the ssh.service and re-ran the ssh-audit from local, which didn't seem to change its list of recommendations suggesting that I've not done something right.



      I suspect I'm not doing the right thing to resolve this for my customer. What should I be doing instead?



      This is a follow-on to showing PCI vendor that Debian 8 has been successfully patched.







      ssh debian-jessie pci






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 6 hours ago









      sam452sam452

      162210




      162210






















          1 Answer
          1






          active

          oldest

          votes


















          1














          On Debian jessie (currently oldstable and in LTS; you should have LTS enabled and be upgrading within the next few months) ssh RSA keys are currently generated with 2048 bits. But if the system was upgraded to jessie, it might have had old keys generated with 1024 bits.



          You can use a command like the following to check the status of the host RSA key:



          error@vmtest-debian8:~$ ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
          2048 1a:bc:78:5e:2f:37:dd:75:c2:70:e8:18:41:35:b9:2e /etc/ssh/ssh_host_rsa_key.pub (RSA)


          If the key is less than 2048 bit, you need to generate a new ssh host key.



          error@vmtest-debian8:~$ sudo ssh-keygen -N '' -b 2048 -t rsa -f /etc/ssh/ssh_host_rsa_key
          Generating public/private rsa key pair.
          /etc/ssh/ssh_host_rsa_key already exists.
          Overwrite (y/n)? y
          Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
          Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
          The key fingerprint is:
          47:60:91:14:b1:15:6e:6d:ea:e9:36:37:31:08:d3:69 root@vmtest-debian8
          The key's randomart image is:
          +---[RSA 2048]----+
          | .B=o. |
          | ..= . |
          | ..+.o |
          | ooEo |
          | S+o. |
          | o..o |
          | o o |
          | .o o |
          | ..o . |
          +-----------------+


          And of course restart OpenSSH.



          error@vmtest-debian8:~$ sudo systemctl restart sshd


          Note that the next time anyone connects to the server, they might get a nastygram like this and be unable to connect:



          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
          Someone could be eavesdropping on you right now (man-in-the-middle attack)!
          It is also possible that a host key has just been changed.


          Affected users will need to edit their known hosts appropriately.






          share|improve this answer


























          • Thank you, so this is via OpenSSL? This system started with Jessie and returns 2048. No clue why PCI vendor believes it's too small.

            – sam452
            5 hours ago











          • @sam452 No, it's OpenSSH. I only used the openssl command line tool to show the properties of the RSA key. It's not actually necessary to use that tool.

            – Michael Hampton
            5 hours ago











          • @sam452 Does your host have a DSA key? I delete these when machines are provisioned if they exist, and where possible prevent them from being recreated.

            – Michael Hampton
            5 hours ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          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: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2fserverfault.com%2fquestions%2f956677%2fssh-server-public-key-too-small%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          On Debian jessie (currently oldstable and in LTS; you should have LTS enabled and be upgrading within the next few months) ssh RSA keys are currently generated with 2048 bits. But if the system was upgraded to jessie, it might have had old keys generated with 1024 bits.



          You can use a command like the following to check the status of the host RSA key:



          error@vmtest-debian8:~$ ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
          2048 1a:bc:78:5e:2f:37:dd:75:c2:70:e8:18:41:35:b9:2e /etc/ssh/ssh_host_rsa_key.pub (RSA)


          If the key is less than 2048 bit, you need to generate a new ssh host key.



          error@vmtest-debian8:~$ sudo ssh-keygen -N '' -b 2048 -t rsa -f /etc/ssh/ssh_host_rsa_key
          Generating public/private rsa key pair.
          /etc/ssh/ssh_host_rsa_key already exists.
          Overwrite (y/n)? y
          Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
          Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
          The key fingerprint is:
          47:60:91:14:b1:15:6e:6d:ea:e9:36:37:31:08:d3:69 root@vmtest-debian8
          The key's randomart image is:
          +---[RSA 2048]----+
          | .B=o. |
          | ..= . |
          | ..+.o |
          | ooEo |
          | S+o. |
          | o..o |
          | o o |
          | .o o |
          | ..o . |
          +-----------------+


          And of course restart OpenSSH.



          error@vmtest-debian8:~$ sudo systemctl restart sshd


          Note that the next time anyone connects to the server, they might get a nastygram like this and be unable to connect:



          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
          Someone could be eavesdropping on you right now (man-in-the-middle attack)!
          It is also possible that a host key has just been changed.


          Affected users will need to edit their known hosts appropriately.






          share|improve this answer


























          • Thank you, so this is via OpenSSL? This system started with Jessie and returns 2048. No clue why PCI vendor believes it's too small.

            – sam452
            5 hours ago











          • @sam452 No, it's OpenSSH. I only used the openssl command line tool to show the properties of the RSA key. It's not actually necessary to use that tool.

            – Michael Hampton
            5 hours ago











          • @sam452 Does your host have a DSA key? I delete these when machines are provisioned if they exist, and where possible prevent them from being recreated.

            – Michael Hampton
            5 hours ago
















          1














          On Debian jessie (currently oldstable and in LTS; you should have LTS enabled and be upgrading within the next few months) ssh RSA keys are currently generated with 2048 bits. But if the system was upgraded to jessie, it might have had old keys generated with 1024 bits.



          You can use a command like the following to check the status of the host RSA key:



          error@vmtest-debian8:~$ ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
          2048 1a:bc:78:5e:2f:37:dd:75:c2:70:e8:18:41:35:b9:2e /etc/ssh/ssh_host_rsa_key.pub (RSA)


          If the key is less than 2048 bit, you need to generate a new ssh host key.



          error@vmtest-debian8:~$ sudo ssh-keygen -N '' -b 2048 -t rsa -f /etc/ssh/ssh_host_rsa_key
          Generating public/private rsa key pair.
          /etc/ssh/ssh_host_rsa_key already exists.
          Overwrite (y/n)? y
          Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
          Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
          The key fingerprint is:
          47:60:91:14:b1:15:6e:6d:ea:e9:36:37:31:08:d3:69 root@vmtest-debian8
          The key's randomart image is:
          +---[RSA 2048]----+
          | .B=o. |
          | ..= . |
          | ..+.o |
          | ooEo |
          | S+o. |
          | o..o |
          | o o |
          | .o o |
          | ..o . |
          +-----------------+


          And of course restart OpenSSH.



          error@vmtest-debian8:~$ sudo systemctl restart sshd


          Note that the next time anyone connects to the server, they might get a nastygram like this and be unable to connect:



          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
          Someone could be eavesdropping on you right now (man-in-the-middle attack)!
          It is also possible that a host key has just been changed.


          Affected users will need to edit their known hosts appropriately.






          share|improve this answer


























          • Thank you, so this is via OpenSSL? This system started with Jessie and returns 2048. No clue why PCI vendor believes it's too small.

            – sam452
            5 hours ago











          • @sam452 No, it's OpenSSH. I only used the openssl command line tool to show the properties of the RSA key. It's not actually necessary to use that tool.

            – Michael Hampton
            5 hours ago











          • @sam452 Does your host have a DSA key? I delete these when machines are provisioned if they exist, and where possible prevent them from being recreated.

            – Michael Hampton
            5 hours ago














          1












          1








          1







          On Debian jessie (currently oldstable and in LTS; you should have LTS enabled and be upgrading within the next few months) ssh RSA keys are currently generated with 2048 bits. But if the system was upgraded to jessie, it might have had old keys generated with 1024 bits.



          You can use a command like the following to check the status of the host RSA key:



          error@vmtest-debian8:~$ ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
          2048 1a:bc:78:5e:2f:37:dd:75:c2:70:e8:18:41:35:b9:2e /etc/ssh/ssh_host_rsa_key.pub (RSA)


          If the key is less than 2048 bit, you need to generate a new ssh host key.



          error@vmtest-debian8:~$ sudo ssh-keygen -N '' -b 2048 -t rsa -f /etc/ssh/ssh_host_rsa_key
          Generating public/private rsa key pair.
          /etc/ssh/ssh_host_rsa_key already exists.
          Overwrite (y/n)? y
          Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
          Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
          The key fingerprint is:
          47:60:91:14:b1:15:6e:6d:ea:e9:36:37:31:08:d3:69 root@vmtest-debian8
          The key's randomart image is:
          +---[RSA 2048]----+
          | .B=o. |
          | ..= . |
          | ..+.o |
          | ooEo |
          | S+o. |
          | o..o |
          | o o |
          | .o o |
          | ..o . |
          +-----------------+


          And of course restart OpenSSH.



          error@vmtest-debian8:~$ sudo systemctl restart sshd


          Note that the next time anyone connects to the server, they might get a nastygram like this and be unable to connect:



          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
          Someone could be eavesdropping on you right now (man-in-the-middle attack)!
          It is also possible that a host key has just been changed.


          Affected users will need to edit their known hosts appropriately.






          share|improve this answer















          On Debian jessie (currently oldstable and in LTS; you should have LTS enabled and be upgrading within the next few months) ssh RSA keys are currently generated with 2048 bits. But if the system was upgraded to jessie, it might have had old keys generated with 1024 bits.



          You can use a command like the following to check the status of the host RSA key:



          error@vmtest-debian8:~$ ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
          2048 1a:bc:78:5e:2f:37:dd:75:c2:70:e8:18:41:35:b9:2e /etc/ssh/ssh_host_rsa_key.pub (RSA)


          If the key is less than 2048 bit, you need to generate a new ssh host key.



          error@vmtest-debian8:~$ sudo ssh-keygen -N '' -b 2048 -t rsa -f /etc/ssh/ssh_host_rsa_key
          Generating public/private rsa key pair.
          /etc/ssh/ssh_host_rsa_key already exists.
          Overwrite (y/n)? y
          Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
          Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
          The key fingerprint is:
          47:60:91:14:b1:15:6e:6d:ea:e9:36:37:31:08:d3:69 root@vmtest-debian8
          The key's randomart image is:
          +---[RSA 2048]----+
          | .B=o. |
          | ..= . |
          | ..+.o |
          | ooEo |
          | S+o. |
          | o..o |
          | o o |
          | .o o |
          | ..o . |
          +-----------------+


          And of course restart OpenSSH.



          error@vmtest-debian8:~$ sudo systemctl restart sshd


          Note that the next time anyone connects to the server, they might get a nastygram like this and be unable to connect:



          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
          Someone could be eavesdropping on you right now (man-in-the-middle attack)!
          It is also possible that a host key has just been changed.


          Affected users will need to edit their known hosts appropriately.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 5 hours ago

























          answered 5 hours ago









          Michael HamptonMichael Hampton

          171k27312636




          171k27312636













          • Thank you, so this is via OpenSSL? This system started with Jessie and returns 2048. No clue why PCI vendor believes it's too small.

            – sam452
            5 hours ago











          • @sam452 No, it's OpenSSH. I only used the openssl command line tool to show the properties of the RSA key. It's not actually necessary to use that tool.

            – Michael Hampton
            5 hours ago











          • @sam452 Does your host have a DSA key? I delete these when machines are provisioned if they exist, and where possible prevent them from being recreated.

            – Michael Hampton
            5 hours ago



















          • Thank you, so this is via OpenSSL? This system started with Jessie and returns 2048. No clue why PCI vendor believes it's too small.

            – sam452
            5 hours ago











          • @sam452 No, it's OpenSSH. I only used the openssl command line tool to show the properties of the RSA key. It's not actually necessary to use that tool.

            – Michael Hampton
            5 hours ago











          • @sam452 Does your host have a DSA key? I delete these when machines are provisioned if they exist, and where possible prevent them from being recreated.

            – Michael Hampton
            5 hours ago

















          Thank you, so this is via OpenSSL? This system started with Jessie and returns 2048. No clue why PCI vendor believes it's too small.

          – sam452
          5 hours ago





          Thank you, so this is via OpenSSL? This system started with Jessie and returns 2048. No clue why PCI vendor believes it's too small.

          – sam452
          5 hours ago













          @sam452 No, it's OpenSSH. I only used the openssl command line tool to show the properties of the RSA key. It's not actually necessary to use that tool.

          – Michael Hampton
          5 hours ago





          @sam452 No, it's OpenSSH. I only used the openssl command line tool to show the properties of the RSA key. It's not actually necessary to use that tool.

          – Michael Hampton
          5 hours ago













          @sam452 Does your host have a DSA key? I delete these when machines are provisioned if they exist, and where possible prevent them from being recreated.

          – Michael Hampton
          5 hours ago





          @sam452 Does your host have a DSA key? I delete these when machines are provisioned if they exist, and where possible prevent them from being recreated.

          – Michael Hampton
          5 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • 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%2fserverfault.com%2fquestions%2f956677%2fssh-server-public-key-too-small%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

          As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Українські прізвища Зміст Історичні відомості |...