PINE64
How to enable SSH server? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: How to enable SSH server? (/showthread.php?tid=10368)

Pages: 1 2


How to enable SSH server? - jnpine - 06-20-2020

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?


RE: How to enable SSH server? - pizzalovingnerd - 06-20-2020

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]


RE: How to enable SSH server? - dukla2000 - 06-24-2020

(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!}


RE: How to enable SSH server? - jnpine - 06-25-2020

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.


RE: How to enable SSH server? - devrtz - 06-25-2020

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!


RE: How to enable SSH server? - dukla2000 - 06-25-2020

(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.


RE: How to enable SSH server? - jnpine - 06-25-2020

(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]


RE: How to enable SSH server? - Joanisc - 11-12-2020

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


RE: How to enable SSH server? - bingo600 - 11-20-2020

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


RE: How to enable SSH server? - Baggypants - 11-20-2020

(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.