SSH from Windows PC into PinePhone?
#1
I tried to SSH into my PinePhone with PostmarketOS on it, according to the following guide:

https://wiki.pine64.org/wiki/Guide:Conne...e_with_SSH

and others.

I connected my PinePhone to a WFI router with SIM card, on with another PC is attached with a Ethernet cable.
Typing ifoncig into the terminal of my PinePhone resulted in:

Lo Link encap: Local Loopback inet addr. 127.0.0.1
.
which is a strange inet addr. I was looking for the IP adress of my PinePhone. Setting these values into PuTTY resulted in a Network error, connection refused.

Then I checked my WIFI router. There where three wireless clients listed, I suppose the last one is my PinePhone with 192.168.1.103

I typed in 192.168.1.103 into PuTTY
result: Network error, connection refused.

How can I solve this?
  Reply
#2
The "lo" adapter is the local loopback and 127.0.0.1 is the correct address for it. On each device running IPV4 that is the local address for that device and it cannot be connected to from the outside.

Unless your pinephone's wifi is turned off there should also be an ip address shown for your wifi adapter. (Presumably you did connect to your wireless network so the adapter is active.) Maybe the listing scrolled off the top of your terminal window? You can try piping ifconfig through "more" to prevent this from happening and verify the ip address. (On Mobian the wifi adapter is "wlan0". Might be something else on Postmarket OS.)

Code:
ifconfig | more

Just in case you're not familiar with "more", pressing the keyboard spacebar scrolls to the next page. (Although more is included with Windows few users seem to know about it.) Of course you need to have ssh server running. You can verify this by entering the following from the terminal on the pinephone:

Code:
ssh 127.0.0.1
  Reply
#3
Consider replacing windows with some linux distro
  Reply
#4
(06-04-2022, 09:53 AM)Peter Gamma Wrote: I tried to SSH into my PinePhone with PostmarketOS on it, according to the following guide:

https://wiki.pine64.org/wiki/Guide:Conne...e_with_SSH

and others.

I connected my PinePhone to a WFI router with SIM card, on with another PC is attached with a Ethernet cable.
Typing ifoncig into the terminal of my PinePhone resulted in:

Lo Link encap: Local Loopback inet addr. 127.0.0.1
.
which is a strange inet addr. I was looking for the IP adress of my PinePhone. Setting these values into PuTTY resulted in a Network error, connection refused.

Then I checked my WIFI router. There where three wireless clients listed, I suppose the last one is my PinePhone with 192.168.1.103

I typed in 192.168.1.103 into PuTTY
result: Network error, connection refused.

How can I solve this?

i recently used postmarketos for updating eg25g's firmware.

postmarketos has firewall enabled by default, but this is not an issue because port 22 is allowed. (not for wwan side though).

most likely you do not have ssh server installed, install it by following. then start it.
Code:
// i take this from my memory, so here could be errors.

# apk add sshd

// start the server, won't last reboot.

# rc-service sshd start
  Reply
#5
We aleady desided to install Linux on a separate PC for PinePhone debugging and migrating to Linux. But the problems whe are facing reminds us of the problems with the Amstrad PC with Z80 8 bit processor and 64 KB RAM 30 years ago, when we installed the CP/M-80 OS and WordStar word processor application for microcomputers.


But the advantages to be able to run the same code and PC, a Linux Phone and a Linux watch are convincing, so that we are considering a complete migration, as soon as the installation problems are under control.


We shut down all unneccessy WIFI devices, still two remain.


When we looked at the network details on the PinePhone, there was


192.168.1.103


listed as phone ip adress.


192.168.1.103 was also listed as wireless client on the router, so it is confirmed that 192.168.1.103 is my PinePhone. Suprisingly when we switch off the phone, the 192.168.1.103 remains. The list seems to be stored.


Internet access from the PinePhone works over the router, no SIM card is plugged in.


But ifoncig gives the same result as before. There is no ip Adress listed.


The «more» command is not necessary, we can scroll up and there is no ip adress. Also using «more» does not change anything.


Code:
1.



typing


ssh

127.0.0.1


gives as a result:


connection refused


Code:
2.
Code:
Trying
to install ssh server


Code:
apk
add sshd


permission denied. I was able to install LibreOffice and it runs. But installing an ssh server seems not to work.


ANY IDEAS?
  Reply
#6
(06-05-2022, 04:34 AM)Peter Gamma Wrote: connection refused

Code:
2.
Code:
Trying
to install ssh server

Code:
apk
add sshd

permission denied. I was able to install LibreOffice and it runs. But installing an ssh server seems not to work.

ANY IDEAS?
quick hint, this forum has a bug for adding spaces, use source code editor to avoid that.

linux world has two philosophies, root user versus sudo. in root user system, root user is activated and has different password, then su -l is used. in sudo system root user usually does not have password but sudo command is used to temporarily give root permission, in sudo systems, user password is usually given. (both could be used in same system btw).

postmarketos uses sudo system, so sudo su -l gives root console.

Code:
// gives root console
$ sudo su -l

// if commanding as ordinary user
$ sudo apk add sshd

// if as root
# apk add sshd

// start temporarily
$ sudo rc-service sshd start
// if permanent startup is wanted
$ sudo rc-update add sshd

https://wiki.postmarketos.org/wiki/SSH
  Reply
#7
Thanks for the detailed instruction, zetabeta.

I am using now LibreOffice and copy paste to Atom source code editor and copy paste to the PinePhone forum. It looks better and saves time to delete unnecessary line breaks.

The above instruction was very helpful.

After a view typing attempts, the echo of our PinePhone was:

starting sshd ...

and a green «o.k»

Then we typed the ip adress of my PinePhone into PuTTY. After typing user name and password, we got an echo from PuTTY terminal with some welcome lines and the PinePhone terminal prompt, which is great:

> pine64-pinephone:~$

But how can we from there start the graphical user interface or posh shell of the PinePhone?
  Reply
#8
Unfortunately, we could not find any clear answer to this question anyhere. This is really a frustrating state of an investigation of«how to SSH from Windows PC to PinePhone with PuTTY».

We where able to have a connection to the PinePhone from a Windows PC and where able to enter command lines in the terminal of the phone but nothing else.

Is there another way to connect from a Windows PC to a PinePhone with SSH?
  Reply
#9
(06-06-2022, 05:54 AM)Peter Gamma Wrote: But how can we from there start the graphical user interface or posh shell of the PinePhone?

is the question more like, how to have graphical connection to the pinephone?

there is "wayvnc", but is it available in postmarketos. i have used in manjaro though. on a windows side, i don't know which client program works.

"rc-service" can start and stop background processes. usually in others it is "systemctl". systemctl can be used to start and stop graphical system. but it seems that phosh was already running.
  Reply
#10
(06-06-2022, 05:54 AM)Peter Gamma Wrote: Thanks for the detailed instruction, zetabeta.

I am using now LibreOffice and copy paste to Atom source code editor and copy paste to the PinePhone forum. It looks better and saves time to delete unnecessary line breaks.

The above instruction was very helpful.

After a view typing attempts, the echo of our PinePhone was:

starting sshd ...

and a green «o.k»

Then we typed the ip adress of my PinePhone into PuTTY. After typing user name and password, we got an echo from PuTTY terminal with some welcome lines and the PinePhone terminal prompt, which is great:

> pine64-pinephone:~$

But how can we from there start the graphical user interface or posh shell of the PinePhone?

Are you thinking of when I described forwarding the display using ssh -X to show libreoffice on my linux desktop? That works because both LibreOffice on the phone, and my desktop, can both use X for display. X has built in support for remote display over the network.
  https://en.wikipedia.org/wiki/X_Window_System
Windows doesn't have X by default so you need to install something that provides it. I last did this with a commercial package in the late '90s but I assume this more recent set of instructions will work:
  https://manjaro.site/how-to-forward-x11-...ing-putty/
I've no idea how good things like copy/paste integration are with this.

By default phosh uses Wayland which is another display system that doesn't natively do network forwarding. While there are probably ways to get it to use X so you could forward the entire display, it will be a lot easier to use something like wayvnc as mentioned above. gnome-remote-desktop may also work (package available in mobian at least) but I think it uses pipewire which may cause problems with the phone audio as most distros are still using pulseaudio. I'm speculating again there - haven't tried it.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Heart What native PinePhone application would you like to see in the near future? kern707 98 42,083 08-02-2022, 12:27 AM
Last Post: shulamy
  PinePhone Pro battery life Barugon 17 7,226 07-29-2022, 09:23 AM
Last Post: prog-amateur
Rainbow New Pinephone for sale, Beta w Convergence Package megst 0 81 07-26-2022, 11:40 AM
Last Post: megst
  Is the Pinephone good for me? FooTester 5 361 07-20-2022, 08:14 AM
Last Post: FooTester
  SELLING: Pinephone 3GB RAM 32GB ROM gerstavros 9 1,276 07-19-2022, 12:11 PM
Last Post: gerstavros
  To live and die on LTE (with a Pinephone) robthebold 2 346 07-08-2022, 11:57 AM
Last Post: robthebold
  PinePhone sound issues Chief 4 386 07-05-2022, 07:58 PM
Last Post: Chief
  get a KVM switch from pinephone cybercommunist 0 193 06-29-2022, 02:14 AM
Last Post: cybercommunist
  Activating a SIM on Pinephone jhasler 5 790 06-26-2022, 06:47 AM
Last Post: joe_w
  Temporary fix for Modem Not Coming Back on in SXMO Postmarketos Pinephone kebab 1 327 06-16-2022, 08:40 AM
Last Post: robthebold

Forum Jump:


Users browsing this thread: 1 Guest(s)