SSH on Raspberry Pi3
-
Hi,
I tried to deploy an application Qt for Raspbian (in raspberry pi 3).I install ubuntu-17.04-desktop-amd64 and qt-opensource-linux-x64-5.8.0 on on my laptop.
I wrote an application with Qt 5.8 for windows. It works fine in windows and Ubuntu.Get IP address of raspberry with"hostname -I": 169.254.181.63
I enable SSH on raspberry from Preferences menu.In Ubuntu:
sudo service ssh status .... .... Starting OpenBSD Secure Shell server. .... Server listening on 0.0.0.0 port 22. .... Server listening on :: port 22. .... Started OpenBSD Secure Shell server.
I connect raspberry pi to laptop with Ethernet cable.
I create new device (Generic Linux Device) in "Tools -> Options…-> Devices -> Devices tab"Host name: 169.254.181.63
SSH port:22
Username: pi
Password: 1 (set by me)Result test:
Device test: SSH connection: Network unreachable.
In Ubuntu:
ssh pi@169.254.181.63 ssh: connect to host 169.254.181.63 port 22: Network is unreachable
I edit the interface file to set the network configuration in raspberry:
sudo nano /etc/network/interfacessource-directory /etc/network/interfaces.d auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 allow-hotplug wlan0 iface wlan0 inet manual
But after reboot raspberry and execute "hostname -I", I have "192.168.100.100 169.254.181.63"
-
Your PC is probably not on the same network as the Pi
What is the IP address of your laptop?
I should look like 169.254.xxx.xxxOr you can go the other way around and change the PI's IP to something like 192.168.xxx.xxx
The bottom line is they have to be in the same network domain, so numbers must be similar.
so you can use ie. 192.168.100.101 and 192.168.100.100
-
Your PC is probably not on the same network as the Pi
What is the IP address of your laptop?
I should look like 169.254.xxx.xxxOr you can go the other way around and change the PI's IP to something like 192.168.xxx.xxx
The bottom line is they have to be in the same network domain, so numbers must be similar.
so you can use ie. 192.168.100.101 and 192.168.100.100
-
Your PC is probably not on the same network as the Pi
What is the IP address of your laptop?
I should look like 169.254.xxx.xxxOr you can go the other way around and change the PI's IP to something like 192.168.xxx.xxx
The bottom line is they have to be in the same network domain, so numbers must be similar.
so you can use ie. 192.168.100.101 and 192.168.100.100
@Eddy
Thank you.
I set IP "192.168.1.100" for raspberry and "192.168.1.2" for laptop (Ubuntu) .Result of "ssh pi@192.168.1.100"
The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established. ECDSA key fingerprint is SHA256:0CTQE8NGdzRVAKfPKaLe6omqtuJfmTzAo74tIGSMRBw. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.1.100' (ECDSA) to the list of known hosts. pi@192.168.1.100's password: The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Jun 6 15:31:21 2017
But in Qt I same error in test device.
And after execute "hostname -I", I have "192.168.1.100 169.254.181.63"Result of "route -n" in laptop:
route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.253 0.0.0.0 UG 0 0 0 enp2s0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp2s0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
-
Hi neda,
This is a networking problem and not Qt related. You will probably get faster answers on the ubuntu forums on how to set up the SSH connection.