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

    Is it possible to login with SSH on the Ubuntu touch mobile

    Scheduled Pinned Locked Moved Solved Support
    9 Posts 4 Posters 3.4k Views 1 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.
    • L Offline
      linuxlion
      last edited by

      My Google Pixel 3a is installed with Ubuntu touch and works OK.
      It is possible to connect with SSH from an Ubuntu Linux system to the Ubuntu touch mobile?

      1 Reply Last reply Reply Quote 0
      • AppLeeA Offline
        AppLee @linuxlion
        last edited by

        Hi @linuxlion

        Glad you figured it out.
        The SSH login with password is not recommended because it is less secure.
        If you protected your device with a PIN code it can be brute forced quite easily with SSH.

        The key pair is more convenient and secure.
        But I can see a couple of (still insecure) scenarios where you would do it the way you chose.
        Be it at your own risks.

        1 Reply Last reply Reply Quote 0
        • K Offline
          kristatos
          last edited by

          You can install UT Tweak Tool from the Openstore and activate SSH within the app. After connecting your phone and the Ubuntu-PC to the same network you enter the phone via SSH from your PC.

          BQ Aquaris E4.5 (UT 16.04)
          Vollaphone (UT 24.04)
          Vollaphone 22 (UT 24.04)

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            linuxlion @kristatos
            last edited by

            @kristatos
            With "systemctl start ssh" the ssh.service is running.
            "netstat -atn | grep LISTEN" give
            tcp 0 0 0.0.0.0:22 0.0.0.0:*

            "ifconfig wlan0" give
            wlan0: flags=4163<UP, BROADCAST,RUNNING,MULTICAST> MTU 1500
            inet 192.168.50.92 netmask 255.255.255.0 broadcast 192.168.50.225

            On an other system in the same network, the command
            "ssh sysadmin@192.168.50.92" give
            sysadmin@192.168.50.92: Permission denied (publickey).

            So I have contact with the sshd on my Ubuntu touch mobile.

            Now I had to solve the publickey problem.

            AppLeeA 1 Reply Last reply Reply Quote 0
            • J Offline
              jojumaxx
              last edited by jojumaxx

              Works for me with password only (no keys) with

              "Password Authentication yes"

              set in

              /etc/ssh/sshd_config.

              Happily running Ubuntu Touch:

              • BQ Aquaris E5 HD (Retired)
              • BQ Aquaris M10 HD (Retired)
              • Meizu MX4 Pro (Retired)
              • Meizu Pro 5 (Retired)
              • PinePhone UBPorts Edition
              • Volla Phone
              • Volla Phone X
              1 Reply Last reply Reply Quote 0
              • AppLeeA Offline
                AppLee @linuxlion
                last edited by

                Hi @linuxlion

                Here is the official documentation.
                https://docs.ubports.com/en/latest/userguide/advanceduse/ssh.html

                Few easy steps well described. You shouldn't have any problem.

                1 Reply Last reply Reply Quote 0
                • L Offline
                  linuxlion
                  last edited by

                  "Password Authentication yes" with a space between Password en Authentication cause that the sshd doesn't start.
                  With "PasswordAuthentication yes" without the space the sshd runs.

                  But in Putty I still get "Disconnected: No supported authentication methods
                  available (server sent )

                  I will try to place a public key on my Ubuntu touch device.

                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    linuxlion
                    last edited by

                    My problem is solved, I can login with ssh and password.
                    The directory /etc/ssh/sshd_config.d contains a file
                    with the name 50-lxc-android-config.conf
                    This file contains the line "PasswordAuthentication=no"
                    I changed the "no" to "yes" and restarted the sshd with
                    "systemctl restart ssh".

                    Strange that the account "phablet" can be used but doesn't exist in
                    /etc/passwd.

                    AppLeeA 1 Reply Last reply Reply Quote 0
                    • AppLeeA Offline
                      AppLee @linuxlion
                      last edited by

                      Hi @linuxlion

                      Glad you figured it out.
                      The SSH login with password is not recommended because it is less secure.
                      If you protected your device with a PIN code it can be brute forced quite easily with SSH.

                      The key pair is more convenient and secure.
                      But I can see a couple of (still insecure) scenarios where you would do it the way you chose.
                      Be it at your own risks.

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        linuxlion
                        last edited by

                        Now, I can also login with key and without password.

                        1 Reply Last reply Reply Quote 2
                        • L linuxlion has marked this topic as solved on
                        • KenedaK Keneda referenced this topic on

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post