milkroundsoftware
Posts: 7
Joined: Thu Sep 16, 2021 2:39 pm

Cannot ssh into my pi from Malta

Thu Sep 16, 2021 5:01 pm

Hi,
I am here on holiday but I want to finish some development on my pi back in uk.

I use vncViewer on windows pc to access vscode running on the pi.

I can Putty-ssh into my pi quite happily.

But VncViewer just times out it doesn't even appear in the ssh log file on the Putty-ssh link.

(as an asside there are plenty LOTS! of attempted logins from Chinese ip addresses)

I have a static ip address on a private network.

Am I missing something what ports should I be forwardsing to my (client) pc??

I will be gratefully for any help received.

I am relatively new to pi, linux and ssh so don't know the technical details of how these operate.

Steve

User avatar
B.Goode
Posts: 12973
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 7:53 am

milkroundsoftware wrote:
Thu Sep 16, 2021 5:01 pm
Hi,
I am here on holiday but I want to finish some development on my pi back in uk.

I use vncViewer on windows pc to access vscode running on the pi.

I can Putty-ssh into my pi quite happily.

But VncViewer just times out it doesn't even appear in the ssh log file on the Putty-ssh link.

(as an asside there are plenty LOTS! of attempted logins from Chinese ip addresses)

I have a static ip address on a private network.

Am I missing something what ports should I be forwardsing to my (client) pc??

I will be gratefully for any help received.

I am relatively new to pi, linux and ssh so don't know the technical details of how these operate.

Steve


There seems to be a mismatch between "Cannot ssh into my pi from Malta" and "I can Putty-ssh into my pi quite happily."

Also between "I use vncViewer on windows pc to access vscode running on the pi." and "VncViewer just times out"



Why would attempts to connect with VncViewer "appear in the ssh log file on the Putty-ssh link." ? They are different, largely unrelated methods for remote access.


Raspberry Pi documentation for Remote Access here - https://www.raspberrypi.org/documentati ... ote-access

If your intended use is non-commercial perhaps the VNC Cloud Connect Service is what you need? https://www.raspberrypi.org/documentati ... s.html#vnc

milkroundsoftware
Posts: 7
Joined: Thu Sep 16, 2021 2:39 pm

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 8:55 am

hi,
I left the UK on Tuesday and was able to ssh into the rasp pi ok, using vncViewer. Pi connected via wire to uk router.

Now in Malta - same pc different ip and different router (obviously), and same vncViewer setup with my home ip address (obviously).

vncViewer tries to connect but times out. As a way of testing that pi is alive I used putty ssh connection, I was able to logon without any problems. I want to use vncViewer as I want to access vscode on the pi.

I have tried to use vscode running on pc (In Malta but had problems with NO X1 Display which I didn't know how to fix.

I would be quite happy if I could just vncViewer into the pi.

I was rather hoping someone might have come across this problem before.

Steve

Cloudcentric
Posts: 1277
Joined: Fri Sep 14, 2012 9:13 am

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 9:04 am

milkroundsoftware wrote:
Mon Sep 20, 2021 8:55 am
hi,
I left the UK on Tuesday and was able to ssh into the rasp pi ok, using vncViewer. Pi connected via wire to uk router.

Now in Malta - same pc different ip and different router (obviously), and same vncViewer setup with my home ip address (obviously).

vncViewer tries to connect but times out. As a way of testing that pi is alive I used putty ssh connection, I was able to logon without any problems. I want to use vncViewer as I want to access vscode on the pi.

I have tried to use vscode running on pc (In Malta but had problems with NO X1 Display which I didn't know how to fix.

I would be quite happy if I could just vncViewer into the pi.

I was rather hoping someone might have come across this problem before.

Steve

Raspberry Pi Operating System ?

Did you set up RealVNC Connect for remote access ? or just in your local network ?

https://www.realvnc.com/en/raspberrypi
.
.

Eirikr70
Posts: 108
Joined: Mon Feb 03, 2020 9:07 pm
Location: Paris, where else ?

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 9:23 am

I would advise you to install a vpn (https://github.com/pivpn/pivpn). That would prevent your pi from chinese attacks. With some prayers it might also solve your problem (although pi xenophobia seems strange to me). :?

milkroundsoftware
Posts: 7
Joined: Thu Sep 16, 2021 2:39 pm

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 9:37 am

Debian 10.10 and NO!

I have come across the link

https://help.realvnc.com/hc/en-us/artic ... rry-pi-0-0

I will give that a whirl and report back

Steve

User avatar
B.Goode
Posts: 12973
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 9:40 am

milkroundsoftware wrote:
Mon Sep 20, 2021 8:55 am
hi,
I left the UK on Tuesday and was able to ssh into the rasp pi ok, using vncViewer. Pi connected via wire to uk router.

Now in Malta - same pc different ip and different router (obviously), and same vncViewer setup with my home ip address (obviously).

vncViewer tries to connect but times out. As a way of testing that pi is alive I used putty ssh connection, I was able to logon without any problems. I want to use vncViewer as I want to access vscode on the pi.

I have tried to use vscode running on pc (In Malta but had problems with NO X1 Display which I didn't know how to fix.

I would be quite happy if I could just vncViewer into the pi.

I was rather hoping someone might have come across this problem before.

Steve


I'm still struggling with past and present tenses.

Are you NOW, from your present location, able to ssh into your RPi system (which itself is physically 'at home' in the UK) ? If so, you can probably be guided to get all the access you need.


Unless you followed the Raspberry Pi and RealVNC documentation (already cited) to set up a tested RealVNC Cloud Server account before you left home I think it is unlikely that you will be able to do so now. [But never say "never" - if you can ssh in there might be a way... ]

Cloudcentric
Posts: 1277
Joined: Fri Sep 14, 2012 9:13 am

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 9:42 am

milkroundsoftware wrote:
Mon Sep 20, 2021 9:37 am
Debian 10.10 and NO!

I have come across the link

https://help.realvnc.com/hc/en-us/artic ... rry-pi-0-0

I will give that a whirl and report back

Steve

Debian is not supported on the Raspberry Pi SBC, though there are two Debian based Operating Systems which have been released by RPT / RPF.
.
.

User avatar
B.Goode
Posts: 12973
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 9:47 am

milkroundsoftware wrote:
Mon Sep 20, 2021 9:37 am
Debian 10.10 and NO!

I have come across the link

https://help.realvnc.com/hc/en-us/artic ... rry-pi-0-0

I will give that a whirl and report back

Steve


My advice is based on the assumed use of the recommended RasPiOS Buster [32] Operating System. It may not be applicable to other OS distributions.


Isn't that RealVNC documentation essentially what the Raspberry Pi advice about RealVNC Cloud Connect (already cited) is based on? Have you worked out how you are going to run the VNC Server application on your RPi to be able to configure it?


Also, for clarification: What is the Hardware + Operating System combination you are currently attempting to use as a local workstation at your current location?

geffers
Posts: 528
Joined: Sun Jun 24, 2012 6:25 am
Location: UK
Contact: Website

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 11:09 am

Maybe easiest remedy with you not being by your Pi is to SSH into your pi, run sudo raspi-config then go to 'Interface Options' then choose enable VNC

VNC should be able to do most of what TeamViewer does, I'm not too familiar with Putty and understand tunnelling is done via the program rather than command line options but VNC serves on port 5900 so that is the one you'd need to use.

VNCviewer is available free and easy enough to download on any platform.

Geoff

milkroundsoftware
Posts: 7
Joined: Thu Sep 16, 2021 2:39 pm

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 12:19 pm

I have enabled vnc in raspi-config.

I have setup a RealVnc account and am trying to connect from VncViewer it trys but ultimately failed.

VNC Server is not currently listening for Cloud connections.

I don't know how to enable that?

Steve

milkroundsoftware
Posts: 7
Joined: Thu Sep 16, 2021 2:39 pm

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 1:54 pm

via a terminal screen that is

User avatar
B.Goode
Posts: 12973
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Cannot ssh into my pi from Malta

Mon Sep 20, 2021 5:31 pm

milkroundsoftware wrote:
Mon Sep 20, 2021 12:19 pm
I have enabled vnc in raspi-config.

I have setup a RealVnc account and am trying to connect from VncViewer it trys but ultimately failed.

VNC Server is not currently listening for Cloud connections.

I don't know how to enable that?

Steve


It seems likely that your 'at home' instance of Real VNC Server needs to be associated with the the RealVNC Cloud Servers using the login details from your RealVNC account creation. Described here https://www.raspberrypi.org/documentati ... s.html#vnc and here https://help.realvnc.com/hc/en-us/artic ... rry-pi-0-1

swampdog
Posts: 783
Joined: Fri Dec 04, 2015 11:22 am

Re: Cannot ssh into my pi from Malta

Tue Sep 21, 2021 7:40 am

If you can connect to it via ssh command line you can attempt to tunnel in. You'll either need a (live) linux distro running on your PC or install cygwin and its "ssh client" (then run 'ssh-user-config'). eg: my laptop has this script under linux..

Code: Select all

~/bin $ cat z-home 
#!/bin/bash
IP="redacted"
ssh \
	-L 4001:std:4000 \
	-L 4002:sdu:4000 \
	-L 4003:olb:4000 \
	-L 10139:smb:139 \
	-L 20139:smb1:139 \
	-Y redacteduser@"$IP"
..where "redacted" is the ip is the internet facing ip of your home pi. The above enables me to connect to nomachine on "std,sdu,olb" by having my laptop connect to localhost:4001,localhost:4002,localhost:4003 respectively. It also allows the laptop to connect to my home samba servers, "smb,smb1" on localhost:10139,localhost:20139.

You'd need something like this..

Code: Select all

yourpc$ ssh -L 10000:redacted:5900 -Y user@redacted
..with X11Forwarding enabled in redacted:/etc/ssh/sshd_config (echo $DISPLAY) then connect your local PC realvnc client to port 10000. Port "10000" value doesn't matter provided it doesn't collide with another port number in use.

geffers
Posts: 528
Joined: Sun Jun 24, 2012 6:25 am
Location: UK
Contact: Website

Re: Cannot ssh into my pi from Malta

Wed Sep 22, 2021 8:20 am

milkroundsoftware wrote:
Mon Sep 20, 2021 12:19 pm
I have enabled vnc in raspi-config.

I have setup a RealVnc account and am trying to connect from VncViewer it trys but ultimately failed.

VNC Server is not currently listening for Cloud connections.

I don't know how to enable that?

Steve
I don't use their cloud options.

If you connect using the following options;

ssh -L 5900:localhost:5900 <user@Pi-Location>

You can then use VNC-Viewer on your Malta computer using just localhost as the connection address and not the Pi's UK IP address.

The -L option transfers the 5900 port on your remote Pi to port 5900 on your local machine, hence being able to use localhost

Be careful of usernames, can get confusing as if accidentally left out it uses the username of the machine you are actually on and not the remote machine.

Geoff

milkroundsoftware
Posts: 7
Joined: Thu Sep 16, 2021 2:39 pm

Re: Cannot ssh into my pi from Malta

Wed Sep 22, 2021 10:56 am

Thankyou That worked just fine.

You have made a 75 year old very happy.

Steve

geffers
Posts: 528
Joined: Sun Jun 24, 2012 6:25 am
Location: UK
Contact: Website

Re: Cannot ssh into my pi from Malta

Thu Sep 23, 2021 10:57 am

milkroundsoftware wrote:
Wed Sep 22, 2021 10:56 am
Thankyou That worked just fine.

You have made a 75 year old very happy.

Steve
I am so pleased, am 72 myself.

I use that command often with a friend in California, ssh is amazingly flexible.

Geoff

milkroundsoftware
Posts: 7
Joined: Thu Sep 16, 2021 2:39 pm

Re: Cannot ssh into my pi from Malta

Fri Sep 24, 2021 3:03 pm

Thankyou again.
Steve

Return to “Networking and servers”