Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    SBC is refusing SSH connection

    Scheduled Pinned Locked Moved Solved
    Firmware installation
    5
    14
    1.1k
    Loading More Posts
    • 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.
    • MaxGyverundefined
      MaxGyver
      last edited by

      Hey,

      so I had to reflash the DuetPi image to my Raspberry Pi SD-Card a couple of times because I am unsuccessfully trying to get a PI webcam stream running.

      Usually I could follow the steps from the getting started guide...flash the image with etcher, configure Wi-Fi in the wpa_supplicant.conf file, boot on the pi and configure the rest via SSH using putty.

      But after a few back and forth the PI is refusing the SSH Connection

      error.PNG

      The SBC has an internet connection, I have checked it on the attached touchscreen.
      I am absolutely clueless

      -Max

      A Former User? 1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk
        last edited by

        Or add a blank file called "SSH" in the boot partition before first boot.

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

        MaxGyverundefined 1 Reply Last reply Reply Quote 1
        • A Former User?
          A Former User @MaxGyver
          last edited by

          @MaxGyver said in SBC is refusing SSH connection:

          But after a few back and forth the PI is refusing the SSH Connection

          given thats not the dafault behaviour; are you sure you have the correct ip?

          1 Reply Last reply Reply Quote 0
          • Phaedruxundefined
            Phaedrux Moderator
            last edited by

            You're the second person to mention SSH not working out of the box on the duet pi image. I wonder if something changed in the recent build? @chrishamm

            Z-Bot CoreXY Build | Thingiverse Profile

            1 Reply Last reply Reply Quote 0
            • A Former User?
              A Former User
              last edited by

              (I tried the 2020-08-22-DuetPi-lite.img yesterday, SSH enabled and running, no iptables rules. Is there a updated image i didn't see?)

              MaxGyverundefined 1 Reply Last reply Reply Quote 0
              • MaxGyverundefined
                MaxGyver @A Former User
                last edited by MaxGyver

                @bearer I am experiencing this issue only with the normal DuetPi version. As far as I remember the Duet Pi-lite version is working as intended. But since I am using the 7" Raspberry Pi Touch Display I need the GUI. On booting, this Wi-Fi setup wizard appears. Although I have configured the Wi-Fi in the wpa_supplicant.conf file beforehand. I do not remember seeing this during previous installations.

                IMG_20201120_222453.jpg

                -Max

                A Former User? 1 Reply Last reply Reply Quote 0
                • MaxGyverundefined
                  MaxGyver
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • A Former User?
                    A Former User @MaxGyver
                    last edited by A Former User

                    @MaxGyver said in SBC is refusing SSH connection:

                    previous installations. I do not remember seeing this during

                    oddly enough none lite image doens't contain the /boot/wpa_supplicant.conf template but doesn't matter if you roll your own. although if it ends up as /boot/wpa_supplicant.conf.txt it won't work

                    however none lite image says:

                    Raspbian GNU/Linux 10 duet3 ttyAMA0
                    
                    duet3 login: pi
                    Password:
                    Last login: Sat Nov 21 14:12:11 GMT 2020 on tty1
                    Linux duet3 4.19.50+ #1 Tue Nov 26 01:49:16 CET 2019 armv6l
                    
                    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.
                    pi@duet3:~$ sudo service ssh status
                    ΓùÅ ssh.service - OpenBSD Secure Shell server
                       Loaded: loaded (/lib/systemd/system/ssh.service; disabled; vendor preset: ena
                       Active: inactive (dead)
                         Docs: man:sshd(8)
                               man:sshd_config(5)
                    pi@duet3:~$
                    
                    pi@duet3:~$ sudo /usr/sbin/sshd
                    Missing privilege separation directory: /run/sshd
                    pi@duet3:~$ sudo mkdir /run/sshd
                    pi@duet3:~$ sudo /usr/sbin/sshd
                    pi@duet3:~$
                    

                    ssh works, you can sort it out using a serial connection to the pi or qemu as a bandaid pending surgery

                    1 Reply Last reply Reply Quote 0
                    • A Former User?
                      A Former User
                      last edited by A Former User

                      after having this grinding in the back of my mind during a fireworks display (wee!) I think this is the proper solution until a new image is built

                      echo d /run/sshd 0755 root root | sudo tee /usr/lib/tmpfiles.d/sshd.conf

                      (at least) four ways to apply this fix on the pi/image

                      • screen and keyboard
                      • serial console on the pi
                      • boot the image in qemu emulator *
                      • mount the image**

                      *) see bottom of this post https://forum.duet3d.com/post/193770

                      **) mounting the image changes the relative path, i use this script on linux to mount two parts of the image. and the command would be echo d /run/sshd 0755 root root | sudo tee ~/img/root/usr/lib/tmpfiles.d/sshd.conf

                      (edit: oh, and sudo service ssh restart or sudo reboot after)

                      1 Reply Last reply Reply Quote 0
                      • A Former User?
                        A Former User
                        last edited by

                        d'oh - never assume the simple method has been tried:

                        section 3: https://www.raspberrypi.org/documentation/remote-access/ssh/

                        1 Reply Last reply Reply Quote 0
                        • jay_s_ukundefined
                          jay_s_uk
                          last edited by

                          Or add a blank file called "SSH" in the boot partition before first boot.

                          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                          MaxGyverundefined 1 Reply Last reply Reply Quote 1
                          • MaxGyverundefined
                            MaxGyver @jay_s_uk
                            last edited by

                            @jay_s_uk Yep, that did the trick! Thank you!
                            @bearer Your proposal worked as well, it just did not occur to me to use the attached display for enabling SSH via the GUI

                            Cheers
                            Max

                            1 Reply Last reply Reply Quote 0
                            • chrishammundefined
                              chrishamm administrators
                              last edited by

                              DuetPi lite has SSH enabled by default and wpa_supplicant.conf is present on the boot partition, because usually you don't have a display attached to those setups.

                              DuetPi (with GUI) does not have SSH enabled by default, but you can enable it by putting an empty "ssh" file on the boot partition (like @jay_s_uk said). wpa_supplicant.conf is no longer present in this image variant because the preferred configuration method is the official setup wizard. If SSH was still enabled in the full image, you'd see a warning message about the standard password after every boot.

                              Duet software engineer

                              A Former User? Phaedruxundefined 2 Replies Last reply Reply Quote 1
                              • A Former User?
                                A Former User @chrishamm
                                last edited by

                                @chrishamm said in SBC is refusing SSH connection:

                                If SSH was still enabled in the full image, you'd see a warning message about the standard password after every boot.

                                for all intents and purposes you get the same warning on the lite image, on every login not just every boot.

                                due to the odd mechanism of having it fail to start rather than being disabled it could have been an idea to document the change from the 2020-05-19 image though.

                                1 Reply Last reply Reply Quote 0
                                • Phaedruxundefined
                                  Phaedrux Moderator @chrishamm
                                  last edited by

                                  @chrishamm said in SBC is refusing SSH connection:

                                  DuetPi lite has SSH enabled by default and wpa_supplicant.conf is present on the boot partition, because usually you don't have a display attached to those setups.

                                  DuetPi (with GUI) does not have SSH enabled by default, but you can enable it by putting an empty "ssh" file on the boot partition (like @jay_s_uk said). wpa_supplicant.conf is no longer present in this image variant because the preferred configuration method is the official setup wizard. If SSH was still enabled in the full image, you'd see a warning message about the standard password after every boot.

                                  I've added a note about this to the SBC setup wiki page.

                                  Z-Bot CoreXY Build | Thingiverse Profile

                                  1 Reply Last reply Reply Quote 2
                                  • First post
                                    Last post
                                  Unless otherwise noted, all forum content is licensed under CC-BY-SA