SSH key setup to login multiple hosts without password

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











up vote
0
down vote

favorite












I installed Putty on my local Windows machine A. I am connecting to remote linux server B from A. From B, I want to connect to multiple other remote machines C, D, E, F etc without entering password all the time.



Is there any way to achieve this ? I tried setting up SSH keys from A to B. But to login to multiple other hosts from B, do I need to set keys on every other hosts ?







share|improve this question




















  • I think this answers your question.
    – sarpu
    Feb 9 at 21:15














up vote
0
down vote

favorite












I installed Putty on my local Windows machine A. I am connecting to remote linux server B from A. From B, I want to connect to multiple other remote machines C, D, E, F etc without entering password all the time.



Is there any way to achieve this ? I tried setting up SSH keys from A to B. But to login to multiple other hosts from B, do I need to set keys on every other hosts ?







share|improve this question




















  • I think this answers your question.
    – sarpu
    Feb 9 at 21:15












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I installed Putty on my local Windows machine A. I am connecting to remote linux server B from A. From B, I want to connect to multiple other remote machines C, D, E, F etc without entering password all the time.



Is there any way to achieve this ? I tried setting up SSH keys from A to B. But to login to multiple other hosts from B, do I need to set keys on every other hosts ?







share|improve this question












I installed Putty on my local Windows machine A. I am connecting to remote linux server B from A. From B, I want to connect to multiple other remote machines C, D, E, F etc without entering password all the time.



Is there any way to achieve this ? I tried setting up SSH keys from A to B. But to login to multiple other hosts from B, do I need to set keys on every other hosts ?









share|improve this question











share|improve this question




share|improve this question










asked Feb 9 at 20:56









aruncoder

1




1











  • I think this answers your question.
    – sarpu
    Feb 9 at 21:15
















  • I think this answers your question.
    – sarpu
    Feb 9 at 21:15















I think this answers your question.
– sarpu
Feb 9 at 21:15




I think this answers your question.
– sarpu
Feb 9 at 21:15










2 Answers
2






active

oldest

votes

















up vote
0
down vote













Yes, you need to add a private key(*) in your SSH config on host B, and the matching public key in the authorized_keys file on C,D,E,F.



(*) Which is best kept distinct from the one you use to login from A to B.






share|improve this answer



























    up vote
    0
    down vote













    Yes you need to set up ssh-key authentication from Host B to all hosts. to connect from B to other hosts with out password. You can copy public key generated in B host to all other hosts in authorized_keys file



    There is another method also using sshpass .



    But it wont be secure format of using sshpass is as below:



    sshpass -p "password" ssh username@hostname





    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%2f423118%2fssh-key-setup-to-login-multiple-hosts-without-password%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













      Yes, you need to add a private key(*) in your SSH config on host B, and the matching public key in the authorized_keys file on C,D,E,F.



      (*) Which is best kept distinct from the one you use to login from A to B.






      share|improve this answer
























        up vote
        0
        down vote













        Yes, you need to add a private key(*) in your SSH config on host B, and the matching public key in the authorized_keys file on C,D,E,F.



        (*) Which is best kept distinct from the one you use to login from A to B.






        share|improve this answer






















          up vote
          0
          down vote










          up vote
          0
          down vote









          Yes, you need to add a private key(*) in your SSH config on host B, and the matching public key in the authorized_keys file on C,D,E,F.



          (*) Which is best kept distinct from the one you use to login from A to B.






          share|improve this answer












          Yes, you need to add a private key(*) in your SSH config on host B, and the matching public key in the authorized_keys file on C,D,E,F.



          (*) Which is best kept distinct from the one you use to login from A to B.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 11 at 10:34









          xenoid

          1,6851620




          1,6851620






















              up vote
              0
              down vote













              Yes you need to set up ssh-key authentication from Host B to all hosts. to connect from B to other hosts with out password. You can copy public key generated in B host to all other hosts in authorized_keys file



              There is another method also using sshpass .



              But it wont be secure format of using sshpass is as below:



              sshpass -p "password" ssh username@hostname





              share|improve this answer


























                up vote
                0
                down vote













                Yes you need to set up ssh-key authentication from Host B to all hosts. to connect from B to other hosts with out password. You can copy public key generated in B host to all other hosts in authorized_keys file



                There is another method also using sshpass .



                But it wont be secure format of using sshpass is as below:



                sshpass -p "password" ssh username@hostname





                share|improve this answer
























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Yes you need to set up ssh-key authentication from Host B to all hosts. to connect from B to other hosts with out password. You can copy public key generated in B host to all other hosts in authorized_keys file



                  There is another method also using sshpass .



                  But it wont be secure format of using sshpass is as below:



                  sshpass -p "password" ssh username@hostname





                  share|improve this answer














                  Yes you need to set up ssh-key authentication from Host B to all hosts. to connect from B to other hosts with out password. You can copy public key generated in B host to all other hosts in authorized_keys file



                  There is another method also using sshpass .



                  But it wont be secure format of using sshpass is as below:



                  sshpass -p "password" ssh username@hostname






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 12 at 8:20









                  galoget

                  36319




                  36319










                  answered Feb 11 at 9:26









                  Praveen Kumar BS

                  1,010128




                  1,010128






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f423118%2fssh-key-setup-to-login-multiple-hosts-without-password%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      Peggy Mitchell

                      Palaiologos

                      The Forum (Inglewood, California)