How to enable SSH server?
#1
Hi!

I recently created an SD card to test Mobian on the PinePhone.

I would like to SSH onto it but I am not able to do it from another device in the same network.

I am trying to connect to the mobian user with stock password: 1234
I have already installed open ssh-server, the service is running, and can even SSH onto it locally 
$ ssh mobian@localhost

But if I try to SSH from another device it fails.
$ ssh mobian@ipaddress

Am I missing something?
  Reply
#2
Are you using your public ip address or local ip address?

You need to use your  ipv4 address.
You can check this by going into GNOME Settings, Network, click the settings Icon next to your WiFi name, and you can see it there.

Here is a demonstration on my Linux desktop.
[Image: QsmPbMV.png]
  Reply
#3
(06-20-2020, 10:33 PM)jnpine Wrote: Hi!

I recently created an SD card to test Mobian on the PinePhone.

I would like to SSH onto it but I am not able to do it from another device in the same network.

I am trying to connect to the mobian user with stock password: 1234
I have already installed open ssh-server, the service is running, and can even SSH onto it locally 
$ ssh mobian@localhost

But if I try to SSH from another device it fails.
$ ssh mobian@ipaddress

Am I missing something?

Or install iproute2, then at a Kings Cross terminal on the PinePhone type
Code:
ip a

will give you your PinePhone's IP address. Presumably you are trying to connect via the PinePhone's WiFi connection so you need the address of the wlan0: device.

{If you are trying to connect via the PinePhone's USB port then you need to install a few more bits: pinephone-devtools includes them all, is complete overkill as it also pulls in a whole lot of development stuff but is fastest way to get where you want!}
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.2 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO & Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with Arch/SXMO on eMMC
  Reply
#4
Thanks for your replies! 

I have already obtained the PinePhone IP address using ¨ifconfig¨. 

In Mobian is available in /sbin/ifconfig
It has to be executed in the path as it is not aliased. 

I am indeed trying to connect via wifi, I have already accomplish this in Ubuntu touch but not in Mobian. 

I am thinking that I am missing something in the configuration to enable incoming SSH connections onto the PinePhone in Mobian.
  Reply
#5
Hm, weird. Starting from a fresh image it has always worked for me.
Install "openssh-server" on the phone and then run "ssh mobian@mobian". Nothing more was required.

Does Wifi work generally work for you (f.e. browsing the web)?
If you have more than one AP for your network that could cause issues.

Hope you get it working!
  Reply
#6
(06-25-2020, 09:47 AM)jnpine Wrote: Thanks for your replies! 

I have already obtained the PinePhone IP address using ¨ifconfig¨. 

In Mobian is available in /sbin/ifconfig
It has to be executed in the path as it is not aliased. 

I am indeed trying to connect via wifi, I have already accomplish this in Ubuntu touch but not in Mobian. 

I am thinking that I am missing something in the configuration to enable incoming SSH connections onto the PinePhone in Mobian.

Ooh - have you installed pinephone-devtools or just openssh-server? If just openssh then install dnsmasq-base as well.
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.2 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO & Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with Arch/SXMO on eMMC
  Reply
#7
(06-25-2020, 03:11 PM)dukla2000 Wrote:
(06-25-2020, 09:47 AM)jnpine Wrote: Thanks for your replies! 

I have already obtained the PinePhone IP address using ¨ifconfig¨. 

In Mobian is available in /sbin/ifconfig
It has to be executed in the path as it is not aliased. 

I am indeed trying to connect via wifi, I have already accomplish this in Ubuntu touch but not in Mobian. 

I am thinking that I am missing something in the configuration to enable incoming SSH connections onto the PinePhone in Mobian.

Ooh - have you installed pinephone-devtools or just openssh-server? If just openssh then install dnsmasq-base as well.

I installed both packages and was not able to SSH neither, the problem was my client: iTerminal iOS 13.5 in an iPhone.   I changed to another SSH app WebSSH and it is working now.  
I am doing some changes in the /etc/sshd_config to see if something is preventing SSH from the other app. 
So far have deactivated:
#ChallengeResponseAuthentication
#UsePAM yes

And added: 
PermitRootLogin yes. ##To enable SSH from root user, this is working so far. 

I think I will mark this as solved. 
Thanks to everyone for your replies and help!
[Image: Screen-Shot-2020-06-25-at-19-27-02.png]
  Reply
#8
For me it was as easy as do:
On Pinephone:
0. Connect to WiFi
1. Get the Ip doing what @pizzalovingnerd said.
2. sudo apt-get install ssh

On my computer:
ssh mobian@Pinephones IP
  Reply
#9
I have always installed sshd on the pinephone.

But then it struck me ...
When on GSM-Data , would the ssh port be fully exposed to "anyone" on the internet ?
If yes then iptables or ufw would be a good thing to install/activate.

Or at least switch off passwd logins , and only allow ssh key logins
Keys would not be a problem for me , i'm only ssh'ing for 2 machines to the PP

/Bingo
  Reply
#10
(11-20-2020, 02:38 PM)bingo600 Wrote: I have always installed sshd on the pinephone.

But then it struck me ...
When on GSM-Data , would the ssh port be fully exposed to "anyone" on the internet ?
If yes then iptables or ufw would be a good thing to install/activate.

Or at least switch off passwd logins , and only allow ssh key logins
Keys would not be a problem for me , i'm only ssh'ing for 2 machines to the PP

/Bingo

Essentially  the answer to all of these is yes.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PureMaps and OSM Scout Server maps download biketool 7 4,264 10-04-2024, 04:25 AM
Last Post: vusra
  How to enable ipv6 for hotspot robgadget 1 1,144 04-28-2023, 06:59 AM
Last Post: wibble
  rsyslog a bad idea? Problems with ssh, openssh-server, fail2ban Anna 7 6,341 11-14-2021, 06:20 PM
Last Post: juju
  Keyboard click enable county93 3 3,551 10-07-2021, 04:09 PM
Last Post: county93
  Enable Unstable AndyM 7 7,298 07-17-2021, 07:44 AM
Last Post: dflag84

Forum Jump:


Users browsing this thread: 1 Guest(s)