Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. SSH on Raspberry Pi3
QtWS25 Last Chance

SSH on Raspberry Pi3

Scheduled Pinned Locked Moved Solved Installation and Deployment
7 Posts 3 Posters 3.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    neda
    wrote on 10 Jun 2017, 07:02 last edited by neda 6 Oct 2017, 10:20
    #1

    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/interfaces

    source-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"

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Eddy
      wrote on 10 Jun 2017, 08:38 last edited by
      #2

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

      Or 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

      Qt Certified Specialist
      www.edalsolutions.be

      N 2 Replies Last reply 10 Jun 2017, 09:01
      1
      • E Eddy
        10 Jun 2017, 08:38

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

        Or 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

        N Offline
        N Offline
        neda
        wrote on 10 Jun 2017, 09:01 last edited by neda 6 Oct 2017, 09:01
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • E Eddy
          10 Jun 2017, 08:38

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

          Or 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

          N Offline
          N Offline
          neda
          wrote on 10 Jun 2017, 09:14 last edited by neda 6 Oct 2017, 09:24
          #4

          @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
          
          
          1 Reply Last reply
          0
          • E Offline
            E Offline
            Eddy
            wrote on 10 Jun 2017, 11:22 last edited by
            #5

            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.

            Qt Certified Specialist
            www.edalsolutions.be

            N 1 Reply Last reply 11 Jun 2017, 04:08
            1
            • E Eddy
              10 Jun 2017, 11:22

              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.

              N Offline
              N Offline
              neda
              wrote on 11 Jun 2017, 04:08 last edited by
              #6

              @Eddy
              Thank you.

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                z69333186
                wrote on 11 Jun 2017, 07:38 last edited by
                #7

                Try 'sudo service ssh start' in Raspberry?

                1 Reply Last reply
                0

                4/7

                10 Jun 2017, 09:14

                • Login

                • Login or register to search.
                4 out of 7
                • First post
                  4/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved