how to login a remote host using SSH without a password?wakeonlan from remote hostHow can I set up password-less SSH login?Execute a command on local computer from a connected remote SSH host?Unable to connect to my remote Ubuntu system using SSHRun script on remote machine via telnet (not SSH)how to give user server name instead of ip when connecting through SSH?ssh: connect to host myhostname.ddns.net port 22: Connection refusedStep by Step enable remote login to home ubuntu machine?Mosh and ssh stopped working after connection through VPN channelCannot ssh on boot until I login (Ubuntu 16.04)

Do sorcerers' Subtle Spells require a skill check to be unseen?

How does the UK government determine the size of a mandate?

Detecting if an element is found inside a container

Trouble understanding the speech of overseas colleagues

Why not increase contact surface when reentering the atmosphere?

Is there a problem with hiding "forgot password" until it's needed?

India just shot down a satellite from the ground. At what altitude range is the resulting debris field?

System.debug(JSON.Serialize(o)) Not longer shows full string

Is it appropriate to ask a job candidate if we can record their interview?

Is `x >> pure y` equivalent to `liftM (const y) x`

How do we know the LHC results are robust?

Why Were Madagascar and New Zealand Discovered So Late?

Failed to fetch jessie backports repository

How to run a prison with the smallest amount of guards?

What is the difference between "behavior" and "behaviour"?

What is the best translation for "slot" in the context of multiplayer video games?

Class Action - which options I have?

Integer addition + constant, is it a group?

Purchasing a ticket for someone else in another country?

Is there a good way to store credentials outside of a password manager?

How to Reset Passwords on Multiple Websites Easily?

How to pronounce the slash sign

How did Doctor Strange see the winning outcome in Avengers: Infinity War?

when is out of tune ok?



how to login a remote host using SSH without a password?


wakeonlan from remote hostHow can I set up password-less SSH login?Execute a command on local computer from a connected remote SSH host?Unable to connect to my remote Ubuntu system using SSHRun script on remote machine via telnet (not SSH)how to give user server name instead of ip when connecting through SSH?ssh: connect to host myhostname.ddns.net port 22: Connection refusedStep by Step enable remote login to home ubuntu machine?Mosh and ssh stopped working after connection through VPN channelCannot ssh on boot until I login (Ubuntu 16.04)













0















SSH server is running at remote host. IP Address of the remote host is known.



Using NMAP command we can see SSH service is running at port 22 which is open.



How to login remote host using ssh client without password?



Example: ssh root@ip_address



How to know the user account details such as the number of users present in that remote host and their usernames ?



hostname command gives us the name of the host. Is there any command to know the username present within a remote host?



How to execute a linux command on a remote machine without logged in to that remote host?










share|improve this question














bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 3





    This could be illegal.... so I don't know if it is possible!

    – Ubuntu User
    Feb 6 '17 at 19:40















0















SSH server is running at remote host. IP Address of the remote host is known.



Using NMAP command we can see SSH service is running at port 22 which is open.



How to login remote host using ssh client without password?



Example: ssh root@ip_address



How to know the user account details such as the number of users present in that remote host and their usernames ?



hostname command gives us the name of the host. Is there any command to know the username present within a remote host?



How to execute a linux command on a remote machine without logged in to that remote host?










share|improve this question














bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 3





    This could be illegal.... so I don't know if it is possible!

    – Ubuntu User
    Feb 6 '17 at 19:40













0












0








0








SSH server is running at remote host. IP Address of the remote host is known.



Using NMAP command we can see SSH service is running at port 22 which is open.



How to login remote host using ssh client without password?



Example: ssh root@ip_address



How to know the user account details such as the number of users present in that remote host and their usernames ?



hostname command gives us the name of the host. Is there any command to know the username present within a remote host?



How to execute a linux command on a remote machine without logged in to that remote host?










share|improve this question














SSH server is running at remote host. IP Address of the remote host is known.



Using NMAP command we can see SSH service is running at port 22 which is open.



How to login remote host using ssh client without password?



Example: ssh root@ip_address



How to know the user account details such as the number of users present in that remote host and their usernames ?



hostname command gives us the name of the host. Is there any command to know the username present within a remote host?



How to execute a linux command on a remote machine without logged in to that remote host?







ssh remote-desktop remote-access sshd remote-login






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 6 '17 at 19:36









Dipankar NaluiDipankar Nalui

1891311




1891311





bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.









  • 3





    This could be illegal.... so I don't know if it is possible!

    – Ubuntu User
    Feb 6 '17 at 19:40












  • 3





    This could be illegal.... so I don't know if it is possible!

    – Ubuntu User
    Feb 6 '17 at 19:40







3




3





This could be illegal.... so I don't know if it is possible!

– Ubuntu User
Feb 6 '17 at 19:40





This could be illegal.... so I don't know if it is possible!

– Ubuntu User
Feb 6 '17 at 19:40










3 Answers
3






active

oldest

votes


















0














You can setup the PKI.
On the host machines you generate your key-pairs. It will prompt you for default location where to store your:



  • public key(extension .pub)

  • private key(no extension)

Usually it is in ~/.ssh/ folder.
ssh-keygen -t rsa



And use ssh copy-id to update your server authorized_keys



ssh-copy-id root@ip_of_the server



Alternatively, you can append the contents of your public key ~/.ssh/id_rsa.pub to the remote host's ~/.ssh/authorized_keys






share|improve this answer

























  • You will need the root password for the ssh-copy-id command.

    – user68186
    Feb 6 '17 at 19:45












  • @user68186 Yep. I assumed he has the access to the remote.

    – fugitive
    Feb 6 '17 at 19:51











  • sorry @fugitive I do not know the root password of remote host.

    – Dipankar Nalui
    Feb 6 '17 at 20:06












  • @DipankarNalui then - it is not possible. At least in no legitimate way.

    – fugitive
    Feb 6 '17 at 20:15






  • 2





    @DipankarNalui The content of your question and your comments here appears like you are trying to hack into s computer where you don't have any connection. That is against the law. We don't support breaking the law or any other unethical activity on this site. You would have to communicate with the owner of the site and get the credentials from them to have access. If they don't give it to you, you should respect their property the same way you would like your home or real property to be respected.

    – L. D. James
    Feb 6 '17 at 20:59


















0














With login remote host using ssh client without password, I think you can check problems as:



  • Permission of file ~/.ssh/authorized_keys after you create and add key id_rsa.pub to file(Ex: User root --> file /root/.ssh/authorized_keys), but when you create file maybe it have permission is: -rw-rw-r-- 1 test1 test1 4 Aug 9 11:19 authorized_keys. After you change permission 600 for file with command: chmod -R 600 authorized_keys.

Check permission user root in file /etc/sudoers. You can add option NOPASSWD for user or group in file with line:



  • For a single user: root ALL=NOPASSWD: ALL

  • For a group : %supergroup ALL=(ALL) NOPASSWD:ALL

In Firewall I think you can open and allow IP Remote to port 22.



ufw allow from [IP Remote] to any port 22


or



ufw allow from any to any port 22


I hope it help you remote without password.






share|improve this answer
































    0














    You should not ask these questions here, log in without permissions are forbidden. Nevertheless at the level of your question is quite very beginner level so hacking would out of discussion :)






    share|improve this answer






















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      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%2faskubuntu.com%2fquestions%2f880541%2fhow-to-login-a-remote-host-using-ssh-without-a-password%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      You can setup the PKI.
      On the host machines you generate your key-pairs. It will prompt you for default location where to store your:



      • public key(extension .pub)

      • private key(no extension)

      Usually it is in ~/.ssh/ folder.
      ssh-keygen -t rsa



      And use ssh copy-id to update your server authorized_keys



      ssh-copy-id root@ip_of_the server



      Alternatively, you can append the contents of your public key ~/.ssh/id_rsa.pub to the remote host's ~/.ssh/authorized_keys






      share|improve this answer

























      • You will need the root password for the ssh-copy-id command.

        – user68186
        Feb 6 '17 at 19:45












      • @user68186 Yep. I assumed he has the access to the remote.

        – fugitive
        Feb 6 '17 at 19:51











      • sorry @fugitive I do not know the root password of remote host.

        – Dipankar Nalui
        Feb 6 '17 at 20:06












      • @DipankarNalui then - it is not possible. At least in no legitimate way.

        – fugitive
        Feb 6 '17 at 20:15






      • 2





        @DipankarNalui The content of your question and your comments here appears like you are trying to hack into s computer where you don't have any connection. That is against the law. We don't support breaking the law or any other unethical activity on this site. You would have to communicate with the owner of the site and get the credentials from them to have access. If they don't give it to you, you should respect their property the same way you would like your home or real property to be respected.

        – L. D. James
        Feb 6 '17 at 20:59















      0














      You can setup the PKI.
      On the host machines you generate your key-pairs. It will prompt you for default location where to store your:



      • public key(extension .pub)

      • private key(no extension)

      Usually it is in ~/.ssh/ folder.
      ssh-keygen -t rsa



      And use ssh copy-id to update your server authorized_keys



      ssh-copy-id root@ip_of_the server



      Alternatively, you can append the contents of your public key ~/.ssh/id_rsa.pub to the remote host's ~/.ssh/authorized_keys






      share|improve this answer

























      • You will need the root password for the ssh-copy-id command.

        – user68186
        Feb 6 '17 at 19:45












      • @user68186 Yep. I assumed he has the access to the remote.

        – fugitive
        Feb 6 '17 at 19:51











      • sorry @fugitive I do not know the root password of remote host.

        – Dipankar Nalui
        Feb 6 '17 at 20:06












      • @DipankarNalui then - it is not possible. At least in no legitimate way.

        – fugitive
        Feb 6 '17 at 20:15






      • 2





        @DipankarNalui The content of your question and your comments here appears like you are trying to hack into s computer where you don't have any connection. That is against the law. We don't support breaking the law or any other unethical activity on this site. You would have to communicate with the owner of the site and get the credentials from them to have access. If they don't give it to you, you should respect their property the same way you would like your home or real property to be respected.

        – L. D. James
        Feb 6 '17 at 20:59













      0












      0








      0







      You can setup the PKI.
      On the host machines you generate your key-pairs. It will prompt you for default location where to store your:



      • public key(extension .pub)

      • private key(no extension)

      Usually it is in ~/.ssh/ folder.
      ssh-keygen -t rsa



      And use ssh copy-id to update your server authorized_keys



      ssh-copy-id root@ip_of_the server



      Alternatively, you can append the contents of your public key ~/.ssh/id_rsa.pub to the remote host's ~/.ssh/authorized_keys






      share|improve this answer















      You can setup the PKI.
      On the host machines you generate your key-pairs. It will prompt you for default location where to store your:



      • public key(extension .pub)

      • private key(no extension)

      Usually it is in ~/.ssh/ folder.
      ssh-keygen -t rsa



      And use ssh copy-id to update your server authorized_keys



      ssh-copy-id root@ip_of_the server



      Alternatively, you can append the contents of your public key ~/.ssh/id_rsa.pub to the remote host's ~/.ssh/authorized_keys







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Feb 6 '17 at 19:49

























      answered Feb 6 '17 at 19:41









      fugitivefugitive

      730413




      730413












      • You will need the root password for the ssh-copy-id command.

        – user68186
        Feb 6 '17 at 19:45












      • @user68186 Yep. I assumed he has the access to the remote.

        – fugitive
        Feb 6 '17 at 19:51











      • sorry @fugitive I do not know the root password of remote host.

        – Dipankar Nalui
        Feb 6 '17 at 20:06












      • @DipankarNalui then - it is not possible. At least in no legitimate way.

        – fugitive
        Feb 6 '17 at 20:15






      • 2





        @DipankarNalui The content of your question and your comments here appears like you are trying to hack into s computer where you don't have any connection. That is against the law. We don't support breaking the law or any other unethical activity on this site. You would have to communicate with the owner of the site and get the credentials from them to have access. If they don't give it to you, you should respect their property the same way you would like your home or real property to be respected.

        – L. D. James
        Feb 6 '17 at 20:59

















      • You will need the root password for the ssh-copy-id command.

        – user68186
        Feb 6 '17 at 19:45












      • @user68186 Yep. I assumed he has the access to the remote.

        – fugitive
        Feb 6 '17 at 19:51











      • sorry @fugitive I do not know the root password of remote host.

        – Dipankar Nalui
        Feb 6 '17 at 20:06












      • @DipankarNalui then - it is not possible. At least in no legitimate way.

        – fugitive
        Feb 6 '17 at 20:15






      • 2





        @DipankarNalui The content of your question and your comments here appears like you are trying to hack into s computer where you don't have any connection. That is against the law. We don't support breaking the law or any other unethical activity on this site. You would have to communicate with the owner of the site and get the credentials from them to have access. If they don't give it to you, you should respect their property the same way you would like your home or real property to be respected.

        – L. D. James
        Feb 6 '17 at 20:59
















      You will need the root password for the ssh-copy-id command.

      – user68186
      Feb 6 '17 at 19:45






      You will need the root password for the ssh-copy-id command.

      – user68186
      Feb 6 '17 at 19:45














      @user68186 Yep. I assumed he has the access to the remote.

      – fugitive
      Feb 6 '17 at 19:51





      @user68186 Yep. I assumed he has the access to the remote.

      – fugitive
      Feb 6 '17 at 19:51













      sorry @fugitive I do not know the root password of remote host.

      – Dipankar Nalui
      Feb 6 '17 at 20:06






      sorry @fugitive I do not know the root password of remote host.

      – Dipankar Nalui
      Feb 6 '17 at 20:06














      @DipankarNalui then - it is not possible. At least in no legitimate way.

      – fugitive
      Feb 6 '17 at 20:15





      @DipankarNalui then - it is not possible. At least in no legitimate way.

      – fugitive
      Feb 6 '17 at 20:15




      2




      2





      @DipankarNalui The content of your question and your comments here appears like you are trying to hack into s computer where you don't have any connection. That is against the law. We don't support breaking the law or any other unethical activity on this site. You would have to communicate with the owner of the site and get the credentials from them to have access. If they don't give it to you, you should respect their property the same way you would like your home or real property to be respected.

      – L. D. James
      Feb 6 '17 at 20:59





      @DipankarNalui The content of your question and your comments here appears like you are trying to hack into s computer where you don't have any connection. That is against the law. We don't support breaking the law or any other unethical activity on this site. You would have to communicate with the owner of the site and get the credentials from them to have access. If they don't give it to you, you should respect their property the same way you would like your home or real property to be respected.

      – L. D. James
      Feb 6 '17 at 20:59













      0














      With login remote host using ssh client without password, I think you can check problems as:



      • Permission of file ~/.ssh/authorized_keys after you create and add key id_rsa.pub to file(Ex: User root --> file /root/.ssh/authorized_keys), but when you create file maybe it have permission is: -rw-rw-r-- 1 test1 test1 4 Aug 9 11:19 authorized_keys. After you change permission 600 for file with command: chmod -R 600 authorized_keys.

      Check permission user root in file /etc/sudoers. You can add option NOPASSWD for user or group in file with line:



      • For a single user: root ALL=NOPASSWD: ALL

      • For a group : %supergroup ALL=(ALL) NOPASSWD:ALL

      In Firewall I think you can open and allow IP Remote to port 22.



      ufw allow from [IP Remote] to any port 22


      or



      ufw allow from any to any port 22


      I hope it help you remote without password.






      share|improve this answer





























        0














        With login remote host using ssh client without password, I think you can check problems as:



        • Permission of file ~/.ssh/authorized_keys after you create and add key id_rsa.pub to file(Ex: User root --> file /root/.ssh/authorized_keys), but when you create file maybe it have permission is: -rw-rw-r-- 1 test1 test1 4 Aug 9 11:19 authorized_keys. After you change permission 600 for file with command: chmod -R 600 authorized_keys.

        Check permission user root in file /etc/sudoers. You can add option NOPASSWD for user or group in file with line:



        • For a single user: root ALL=NOPASSWD: ALL

        • For a group : %supergroup ALL=(ALL) NOPASSWD:ALL

        In Firewall I think you can open and allow IP Remote to port 22.



        ufw allow from [IP Remote] to any port 22


        or



        ufw allow from any to any port 22


        I hope it help you remote without password.






        share|improve this answer



























          0












          0








          0







          With login remote host using ssh client without password, I think you can check problems as:



          • Permission of file ~/.ssh/authorized_keys after you create and add key id_rsa.pub to file(Ex: User root --> file /root/.ssh/authorized_keys), but when you create file maybe it have permission is: -rw-rw-r-- 1 test1 test1 4 Aug 9 11:19 authorized_keys. After you change permission 600 for file with command: chmod -R 600 authorized_keys.

          Check permission user root in file /etc/sudoers. You can add option NOPASSWD for user or group in file with line:



          • For a single user: root ALL=NOPASSWD: ALL

          • For a group : %supergroup ALL=(ALL) NOPASSWD:ALL

          In Firewall I think you can open and allow IP Remote to port 22.



          ufw allow from [IP Remote] to any port 22


          or



          ufw allow from any to any port 22


          I hope it help you remote without password.






          share|improve this answer















          With login remote host using ssh client without password, I think you can check problems as:



          • Permission of file ~/.ssh/authorized_keys after you create and add key id_rsa.pub to file(Ex: User root --> file /root/.ssh/authorized_keys), but when you create file maybe it have permission is: -rw-rw-r-- 1 test1 test1 4 Aug 9 11:19 authorized_keys. After you change permission 600 for file with command: chmod -R 600 authorized_keys.

          Check permission user root in file /etc/sudoers. You can add option NOPASSWD for user or group in file with line:



          • For a single user: root ALL=NOPASSWD: ALL

          • For a group : %supergroup ALL=(ALL) NOPASSWD:ALL

          In Firewall I think you can open and allow IP Remote to port 22.



          ufw allow from [IP Remote] to any port 22


          or



          ufw allow from any to any port 22


          I hope it help you remote without password.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 9 '17 at 6:16

























          answered Aug 9 '17 at 6:11









          TannettoTannetto

          40137




          40137





















              0














              You should not ask these questions here, log in without permissions are forbidden. Nevertheless at the level of your question is quite very beginner level so hacking would out of discussion :)






              share|improve this answer



























                0














                You should not ask these questions here, log in without permissions are forbidden. Nevertheless at the level of your question is quite very beginner level so hacking would out of discussion :)






                share|improve this answer

























                  0












                  0








                  0







                  You should not ask these questions here, log in without permissions are forbidden. Nevertheless at the level of your question is quite very beginner level so hacking would out of discussion :)






                  share|improve this answer













                  You should not ask these questions here, log in without permissions are forbidden. Nevertheless at the level of your question is quite very beginner level so hacking would out of discussion :)







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 25 at 19:10









                  AlpyAlpy

                  36516




                  36516



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • 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%2faskubuntu.com%2fquestions%2f880541%2fhow-to-login-a-remote-host-using-ssh-without-a-password%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

                      Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

                      Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

                      Antonio De Lisio Carrera Referencias Menú de navegación«Caracas: evolución relacional multipleja»«Cuando los gobiernos subestiman a las localidades: L a Iniciativa para la Integración de la Infraestructura Regional Suramericana (IIRSA) en la frontera Colombo-Venezolana»«Maestría en Planificación Integral del Ambiente»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«Conózcanos»«Caracas: evolución relacional multipleja»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»