SSH over USB
#1
I'm running Ubuntu on my desktops, and Mobian on the phone. I can SSH over LAN pretty easily, but I would like to connect directly over USB, if possible.

As a bonus, it could be nice if I could connect to my Mobian phone over LAN, but through the USB. I just figure it would faster than over wi-fi, which is a little spotty in my house.
  Reply
#2
Works out of the box now, just plug in that USB cable.

Ditto via ethernet, you may need to share the IPv4 connection that gets created for eth0 in this case though.
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (5.13 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone BraveHeart now v1.2b 3/32Gb daily driver, dual boot via p-boot with Mobian/f2fs/Phosh on eMMC, Arch/ext4/Phosh on SDcard
  • PinePhone v1.2a 2G/16Gb that needs USB board replaced
  Reply
#3
Thanks. MTP seems to be working great, just from connecting the USB. But if I want to log into my Mobian shell, is there a way to do this over USB?

//Edit I get it. It proritizes the cable when you ssh, over wifi LAN. It looks like it also does a reverse tether, where the phone can get an internet connection through the host. Cool!
  Reply
#4
Shoot, this was working, and now it isn't. It seems that sometimes I upgrade my phone, and functions become unavailable. Anyway, how to I manually reinstall and re-enable this functionality? I'd like to get both SSH and IPv4 working over USB.
  Reply
#5
OK I think I have SSH working after all. I just needed to get the IP of the phone when it's over USB. However, my IPv4 sharing isn't working. I see a solution on the wiki, but it's complicated and involves manual modification to both the phone and my computer. Knowing it worked out of the box before, I'm hoping someone can help me with this piece.
  Reply
#6
(01-02-2021, 09:32 PM)3x5co Wrote: OK I think I have SSH working after all. I just needed to get the IP of the phone when it's over USB. However, my IPv4 sharing isn't working. I see a solution on the wiki, but it's complicated and involves manual modification to both the phone and my computer. Knowing it worked out of the box before, I'm hoping someone can help me with this piece.

Unless I am very much mistaken the wiki is superseded. On the assumption you want to share your PinePhone mobile internet connection with the device at the other end of the USB cable then it is (now) much easier.

On Mobian (I am running Arch for today - can swap back if this goes wrong) plug USB-C into your PP and the other end into your Ubuntu desktop. I think (not 100% certain) it should just work, if not open a terminal session both on the PP and the desktop.
Code:
ip a
in both terminals will show you what devices are active for networking - on both ends you are looking for something USB-like and for sure if there is nothing on the PP then there will be nothing on the desktop.

If you have something promising on the desktop end then you may need to reboot the desktop after disconnecting all other internet options - a while back when I was playing it seemed my desktop would get a fixation about the ethernet connection and not bother trying the USB. (I am in no doubt there is an elegant way somewhere to sort this with priorities but ...)

If you have nothing on the desktop but the PP looks promising then try
Code:
nmtui
in the PP terminal. Go to "Edit a connection", select the USB like connection and change its IPv4 configuration from Automatic to Shared.

{As above I am writing this without Mobian in front of me - if things seem a little garble that is my excuse :-) If you still have problems yell and I can fir Mobian!}
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (5.13 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone BraveHeart now v1.2b 3/32Gb daily driver, dual boot via p-boot with Mobian/f2fs/Phosh on eMMC, Arch/ext4/Phosh on SDcard
  • PinePhone v1.2a 2G/16Gb that needs USB board replaced
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)