UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    ssh from phone (client)

    Scheduled Pinned Locked Moved Support
    7 Posts 3 Posters 1.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • A Offline
        Aloys
        last edited by

        Hi,

        I try to connect with ssh from my phone (FP2 with UT) to openssh server on PC (with Ubuntu 16.04).
        I succeed with password authentication, but not with public/private key authentication.
        In a terminal on the phone I did:

        • key generation: ssh-keygen -t rsa
        • copy of public key to server: ssh-copy-id -i ~/.ssh/id_rsa.pub <username>@<ipaddress> Until there, it works fine, the key was added in authorized_keys on server.

        But then when I tried to connect from the phone with ssh <username>@<ipaddress>, I had the message:

        Agent admitted failure to sign using the key
        <username>@<ipaddress>'s password:
        

        After searching what could be wrong, I tried ssh-add, that did not solve the problem, instead the message is displayed twice:

        Agent admitted failure to sign using the key
        Agent admitted failure to sign using the key
        <username>@<ipaddress>'s password:
        

        I reboot the phone, restart the server on PC, delete .ssh on the phone, delete the authorized key on server and redo everything. But the issue is still there!

        Does someone has an idea how to solve this?
        Thanks

        G 1 Reply Last reply Reply Quote 0
        • S Offline
          stefwe
          last edited by

          maybe you found here some idea's what you can try to get it working

          https://kriscode.blogspot.de/2017/12/ssh-and-ubuntu-touch.html

          Meizu MX4 16.04 | Nexus 5 16.04

          A 1 Reply Last reply Reply Quote 0
          • G Offline
            guru @Aloys
            last edited by

            @ublublu Run before ssh:

            unset SSH_AUTH_SOCK

            if this does not help, use ssh -vv ... and post the log here.

            A 1 Reply Last reply Reply Quote 1
            • A Offline
              Aloys @guru
              last edited by

              @guru Thanks
              This works, I can connect to the server by entering my passphrase of private key.

              But this is not a complete solution because I have to do it each time I start a new terminal and I suppose that it prevent from ssh-agent running properly. Doing ssh-add returns Could not open a connection to your authentication agent.

              I find that there was similar issue on ubuntu desktop (and someone with a BQ E5)
              https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/201786
              But it seems there was also no real solution.

              1 Reply Last reply Reply Quote 0
              • A Offline
                Aloys @stefwe
                last edited by

                @Einstein212 Thank for the link.
                It explain how to use ssh but by setting ssh server on phone side.

                In fact, I could do it this way for my purpose: I just want to use rsync to save my phone home.
                I thought it was easier to use ssh as client on my phone. First I have ssh server ready for use on my desktop. Then I had nothing to configure or authorize on my phone (except keys generation and transfer).

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Aloys
                  last edited by

                  Hi,

                  Just to say that now with UT 16.04, no more problem, I can connect by ssh from my phone (ssh client) to my PC (ssh server) by using the public/private key authentication.

                  1 Reply Last reply Reply Quote 1
                  • S Offline
                    stefwe
                    last edited by

                    👍 perfect

                    Meizu MX4 16.04 | Nexus 5 16.04

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post