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":
    I enable SSH on raspberry from Preferences menu.

    In Ubuntu:

    sudo service ssh status
    .... Starting OpenBSD Secure Shell server.
    .... Server listening on 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:
    SSH port:22
    Username: pi
    Password: 1 (set by me)

    Result test:

    Device test: SSH connection: Network unreachable.

    In Ubuntu:

    ssh  pi@
    ssh: connect to host port 22: Network is unreachable

    I edit the interface file to set the network configuration in raspberry:
    sudo nano /etc/network/interfaces

    source-directory /etc/network/interfaces.d
    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet static
    allow-hotplug wlan0
    iface wlan0 inet manual

    But after reboot raspberry and execute "hostname -I", I have ""

  • Moderators

    Your PC is probably not on the same network as the Pi
    What is the IP address of your laptop?
    I should look like

    Or you can go the other way around and change the PI's IP to something like

    The bottom line is they have to be in the same network domain, so numbers must be similar.

    so you can use ie. and

  • This post is deleted!

  • @Eddy
    Thank you.
    I set IP "" for raspberry and "" for laptop (Ubuntu) .

    Result of "ssh pi@"

    The authenticity of host ' (' can't be established.
    ECDSA key fingerprint is SHA256:0CTQE8NGdzRVAKfPKaLe6omqtuJfmTzAo74tIGSMRBw.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '' (ECDSA) to the list of known hosts.
    pi@'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 ""

    Result of "route -n" in laptop:

    route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 enp2s0     U     1000   0        0 enp2s0   U     0      0        0 enp2s0

  • Moderators

    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.

  • @Eddy
    Thank you.

  • Try 'sudo service ssh start' in Raspberry?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.