ssh-copy-id to different remote hosts

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











up vote
2
down vote

favorite












Hello i have a laptop with ubuntu and a mac i have ssh-copy-id to mac succesfully but when i tried from Mac to ubuntu i got a warning. I set a new key but then when tried from Mac to ssh-copy-id to ubuntu i got this warning



The authenticity of host '192.168.x.xxx (192.168.x.xxx)' can't be established.
ECDSA key fingerprint is -----------------------------------------.
Are you sure you want to continue connecting (yes/no)?


So every time i am going to ssh-copy-id to any remote machine i am always going to get



The authenticity of host '192.168.x.xxx (192.168.x.xxx)' can't be established.
ECDSA key fingerprint is -----------------------------------------.
Are you sure you want to continue connecting (yes/no)?


the first time ?? Or am i doing something wrong?



Thank you in advance ~!










share|improve this question

















  • 1




    There is no need to hide your IP address. 192.168.x.x is a private IP address, no one can reach it unless they are in the network.
    – Timothy Pulliam
    Oct 9 '17 at 19:17














up vote
2
down vote

favorite












Hello i have a laptop with ubuntu and a mac i have ssh-copy-id to mac succesfully but when i tried from Mac to ubuntu i got a warning. I set a new key but then when tried from Mac to ssh-copy-id to ubuntu i got this warning



The authenticity of host '192.168.x.xxx (192.168.x.xxx)' can't be established.
ECDSA key fingerprint is -----------------------------------------.
Are you sure you want to continue connecting (yes/no)?


So every time i am going to ssh-copy-id to any remote machine i am always going to get



The authenticity of host '192.168.x.xxx (192.168.x.xxx)' can't be established.
ECDSA key fingerprint is -----------------------------------------.
Are you sure you want to continue connecting (yes/no)?


the first time ?? Or am i doing something wrong?



Thank you in advance ~!










share|improve this question

















  • 1




    There is no need to hide your IP address. 192.168.x.x is a private IP address, no one can reach it unless they are in the network.
    – Timothy Pulliam
    Oct 9 '17 at 19:17












up vote
2
down vote

favorite









up vote
2
down vote

favorite











Hello i have a laptop with ubuntu and a mac i have ssh-copy-id to mac succesfully but when i tried from Mac to ubuntu i got a warning. I set a new key but then when tried from Mac to ssh-copy-id to ubuntu i got this warning



The authenticity of host '192.168.x.xxx (192.168.x.xxx)' can't be established.
ECDSA key fingerprint is -----------------------------------------.
Are you sure you want to continue connecting (yes/no)?


So every time i am going to ssh-copy-id to any remote machine i am always going to get



The authenticity of host '192.168.x.xxx (192.168.x.xxx)' can't be established.
ECDSA key fingerprint is -----------------------------------------.
Are you sure you want to continue connecting (yes/no)?


the first time ?? Or am i doing something wrong?



Thank you in advance ~!










share|improve this question













Hello i have a laptop with ubuntu and a mac i have ssh-copy-id to mac succesfully but when i tried from Mac to ubuntu i got a warning. I set a new key but then when tried from Mac to ssh-copy-id to ubuntu i got this warning



The authenticity of host '192.168.x.xxx (192.168.x.xxx)' can't be established.
ECDSA key fingerprint is -----------------------------------------.
Are you sure you want to continue connecting (yes/no)?


So every time i am going to ssh-copy-id to any remote machine i am always going to get



The authenticity of host '192.168.x.xxx (192.168.x.xxx)' can't be established.
ECDSA key fingerprint is -----------------------------------------.
Are you sure you want to continue connecting (yes/no)?


the first time ?? Or am i doing something wrong?



Thank you in advance ~!







linux ubuntu ssh






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 9 '17 at 19:02









Ioannis K

132




132







  • 1




    There is no need to hide your IP address. 192.168.x.x is a private IP address, no one can reach it unless they are in the network.
    – Timothy Pulliam
    Oct 9 '17 at 19:17












  • 1




    There is no need to hide your IP address. 192.168.x.x is a private IP address, no one can reach it unless they are in the network.
    – Timothy Pulliam
    Oct 9 '17 at 19:17







1




1




There is no need to hide your IP address. 192.168.x.x is a private IP address, no one can reach it unless they are in the network.
– Timothy Pulliam
Oct 9 '17 at 19:17




There is no need to hide your IP address. 192.168.x.x is a private IP address, no one can reach it unless they are in the network.
– Timothy Pulliam
Oct 9 '17 at 19:17










2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










Yes, that is the default and expected behavior of ssh.



You get the warning every time you connect to a host that is not listed in your ~/.ssh/known_host.



If you write yes, the host and it's fingerprint will be added to known_hosts, if you choose no they won't.



In case you connect to the same ip/fqdn, but the fingerprint is not the same you will get an error and a prompt that advises you to remove the offending host from known_host to continue connecting.



The fingerprint will change only if the host or user are replaced/reinstalled.



This is configured in /etc/ssh/ssh_config by the flag:



StrictHostKeyChecking


So, it is normal that any ssh based tool will prompt you to add the host to known_hosts if you haven't connected with other ssh based tools before.






share|improve this answer



























    up vote
    1
    down vote













    You will only get that message if



    1) you are connecting to a machine for the first time. You get the message because the server you are connecting to has an unknown SSH public key (/etc/ssh/*.pub) that is not yet added to your known hosts file (~/.ssh/known_hosts)



    2) if the public key mentioned above has changed on the server you are trying to connect to. Did you reimaged your Ubuntu system? Otherwise could be a man in the middle attack (unlikely if it is on your home network)



    3) you will get that message if you connected to the host previously using it's IP address, but are now using it's hostname or DNS alias (or vice versa). This is because each entry in your ~/.ssh/known_hosts file has a separate entry for hostname and ip address.






    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%2f397099%2fssh-copy-id-to-different-remote-hosts%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
      2
      down vote



      accepted










      Yes, that is the default and expected behavior of ssh.



      You get the warning every time you connect to a host that is not listed in your ~/.ssh/known_host.



      If you write yes, the host and it's fingerprint will be added to known_hosts, if you choose no they won't.



      In case you connect to the same ip/fqdn, but the fingerprint is not the same you will get an error and a prompt that advises you to remove the offending host from known_host to continue connecting.



      The fingerprint will change only if the host or user are replaced/reinstalled.



      This is configured in /etc/ssh/ssh_config by the flag:



      StrictHostKeyChecking


      So, it is normal that any ssh based tool will prompt you to add the host to known_hosts if you haven't connected with other ssh based tools before.






      share|improve this answer
























        up vote
        2
        down vote



        accepted










        Yes, that is the default and expected behavior of ssh.



        You get the warning every time you connect to a host that is not listed in your ~/.ssh/known_host.



        If you write yes, the host and it's fingerprint will be added to known_hosts, if you choose no they won't.



        In case you connect to the same ip/fqdn, but the fingerprint is not the same you will get an error and a prompt that advises you to remove the offending host from known_host to continue connecting.



        The fingerprint will change only if the host or user are replaced/reinstalled.



        This is configured in /etc/ssh/ssh_config by the flag:



        StrictHostKeyChecking


        So, it is normal that any ssh based tool will prompt you to add the host to known_hosts if you haven't connected with other ssh based tools before.






        share|improve this answer






















          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Yes, that is the default and expected behavior of ssh.



          You get the warning every time you connect to a host that is not listed in your ~/.ssh/known_host.



          If you write yes, the host and it's fingerprint will be added to known_hosts, if you choose no they won't.



          In case you connect to the same ip/fqdn, but the fingerprint is not the same you will get an error and a prompt that advises you to remove the offending host from known_host to continue connecting.



          The fingerprint will change only if the host or user are replaced/reinstalled.



          This is configured in /etc/ssh/ssh_config by the flag:



          StrictHostKeyChecking


          So, it is normal that any ssh based tool will prompt you to add the host to known_hosts if you haven't connected with other ssh based tools before.






          share|improve this answer












          Yes, that is the default and expected behavior of ssh.



          You get the warning every time you connect to a host that is not listed in your ~/.ssh/known_host.



          If you write yes, the host and it's fingerprint will be added to known_hosts, if you choose no they won't.



          In case you connect to the same ip/fqdn, but the fingerprint is not the same you will get an error and a prompt that advises you to remove the offending host from known_host to continue connecting.



          The fingerprint will change only if the host or user are replaced/reinstalled.



          This is configured in /etc/ssh/ssh_config by the flag:



          StrictHostKeyChecking


          So, it is normal that any ssh based tool will prompt you to add the host to known_hosts if you haven't connected with other ssh based tools before.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 9 '17 at 19:17









          Bruno9779

          1,117415




          1,117415






















              up vote
              1
              down vote













              You will only get that message if



              1) you are connecting to a machine for the first time. You get the message because the server you are connecting to has an unknown SSH public key (/etc/ssh/*.pub) that is not yet added to your known hosts file (~/.ssh/known_hosts)



              2) if the public key mentioned above has changed on the server you are trying to connect to. Did you reimaged your Ubuntu system? Otherwise could be a man in the middle attack (unlikely if it is on your home network)



              3) you will get that message if you connected to the host previously using it's IP address, but are now using it's hostname or DNS alias (or vice versa). This is because each entry in your ~/.ssh/known_hosts file has a separate entry for hostname and ip address.






              share|improve this answer
























                up vote
                1
                down vote













                You will only get that message if



                1) you are connecting to a machine for the first time. You get the message because the server you are connecting to has an unknown SSH public key (/etc/ssh/*.pub) that is not yet added to your known hosts file (~/.ssh/known_hosts)



                2) if the public key mentioned above has changed on the server you are trying to connect to. Did you reimaged your Ubuntu system? Otherwise could be a man in the middle attack (unlikely if it is on your home network)



                3) you will get that message if you connected to the host previously using it's IP address, but are now using it's hostname or DNS alias (or vice versa). This is because each entry in your ~/.ssh/known_hosts file has a separate entry for hostname and ip address.






                share|improve this answer






















                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  You will only get that message if



                  1) you are connecting to a machine for the first time. You get the message because the server you are connecting to has an unknown SSH public key (/etc/ssh/*.pub) that is not yet added to your known hosts file (~/.ssh/known_hosts)



                  2) if the public key mentioned above has changed on the server you are trying to connect to. Did you reimaged your Ubuntu system? Otherwise could be a man in the middle attack (unlikely if it is on your home network)



                  3) you will get that message if you connected to the host previously using it's IP address, but are now using it's hostname or DNS alias (or vice versa). This is because each entry in your ~/.ssh/known_hosts file has a separate entry for hostname and ip address.






                  share|improve this answer












                  You will only get that message if



                  1) you are connecting to a machine for the first time. You get the message because the server you are connecting to has an unknown SSH public key (/etc/ssh/*.pub) that is not yet added to your known hosts file (~/.ssh/known_hosts)



                  2) if the public key mentioned above has changed on the server you are trying to connect to. Did you reimaged your Ubuntu system? Otherwise could be a man in the middle attack (unlikely if it is on your home network)



                  3) you will get that message if you connected to the host previously using it's IP address, but are now using it's hostname or DNS alias (or vice versa). This is because each entry in your ~/.ssh/known_hosts file has a separate entry for hostname and ip address.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 9 '17 at 19:26









                  Timothy Pulliam

                  1,041517




                  1,041517



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397099%2fssh-copy-id-to-different-remote-hosts%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