RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Keep SSH enabled at EVERY boot

    Scheduled Pinned Locked Moved Help and Support
    ssh
    19 Posts 7 Posters 4.1k Views
    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.
    • BobHarrisB
      BobHarris @creativename
      last edited by

      @creativename said in Keep SSH enabled at EVERY boot:

      Reading online I learned that, since 4.2, SSH is disabled by default. I know how to enable it via raspi-config, no trouble there.

      I also read that I could create a blank file "ssh" in /boot/ that would enable SSH on first boot. That worked fine and dandy....ONCE

      All I ever did was enable SSH in raspi-config and then it was enabled for as long as I didn't change this setting. Why did you create the blank file? Maybe that's where things went wrong for you?

      Pi 3B , 64 GB Sandisk ultra flashdrive, 19 systems, 872 hand picked classic gaming gems :-) Dual shock 4v2

      C ClydeC 2 Replies Last reply Reply Quote 0
      • C
        creativename @BobHarris
        last edited by

        @bobharris said in Keep SSH enabled at EVERY boot:

        All I ever did was enable SSH in raspi-config and then it was enabled for as long as I didn't change this setting. Why did you create the blank file? Maybe that's where things went wrong for you?

        Yes, I tried just changing the setting in raspi-config at first. That didn't seem to make the SSH server "stick" at each boot and reboot. That's when i went for the creating the ssh file approach

        1 Reply Last reply Reply Quote 0
        • ClydeC
          Clyde @BobHarris
          last edited by

          @bobharris said in Keep SSH enabled at EVERY boot:

          All I ever did was enable SSH in raspi-config and then it was enabled for as long as I didn't change this setting. Why did you create the blank file? Maybe that's where things went wrong for you?

          It's one of the official ways to enable ssh in Retropie (and Raspbian), so it shouldn't cause this behaviour.

          1 Reply Last reply Reply Quote 1
          • C
            creativename @dankcushions
            last edited by

            @dankcushions said in Keep SSH enabled at EVERY boot:

            the deletion of the file is correct. it uses it to set SSH on and that setting should maintain between boots whether the file is there or not. something else going on here...

            i think you must be right! i have the pi setup as 10.0.0.3 on dhcp reservations, and the Pi tells me it's IP is that one...i just tried to ping the address via windows10 machine, but get "destination host unreachable"

            this, even thought the Pi is definitely connected to the network and it can, for example, download updates and ES themes

            hmmmmmmmmmmmmmmmmm

            1 Reply Last reply Reply Quote 0
            • C
              creativename
              last edited by

              update...unticked a "WMM" wifi multimedia setting and rebooted...now i am connected, can ping, can SSH

              I do experience a 25% packet loss when pinging from my windows machine. idk if its odd or normal, but its always the 3rd ping that is dropped

              1 Reply Last reply Reply Quote 0
              • SanoS
                Sano
                last edited by

                Firstof all, it seems more like a network issue than SSH disabled. You may verify SSH daemon status by systemctl status ssh.service, ps -ef | grep sshd or whatever method you prefer.
                Second, a A class private network is quite overkill :)
                Packet drops on a wired local network without routing should be extremely rare (at most).
                Some points you may check :

                • duplicate IP (would be a shame to choose same through 16 777 216 possibilities ;)
                • more than one IP in the same subnet on the RPi (could your Wifi and your wired network be both configured ?)

                Anyway, an ifconfig -aon the RPi and ipconfig /afrom your workstation could also help could help.

                C 1 Reply Last reply Reply Quote 1
                • C
                  creativename @Sano
                  last edited by

                  @sano said in Keep SSH enabled at EVERY boot:

                  Anyway, an ifconfig -aon the RPi and ipconfig /afrom your workstation could also help could help.

                  ifconfig -a on the RPi gave me ...

                  pi@retropie:~ $ ifconfig -a
                  eth0 Link encap:Ethernet HWaddr b8:27:eb:22:98:a5
                  inet6 addr: fe80::8c55:ae5a:faae:5db6/64 Scope:Link
                  UP BROADCAST MULTICAST MTU:1500 Metric:1
                  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:1000
                  RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

                  lo Link encap:Local Loopback
                  inet addr:127.0.0.1 Mask:255.0.0.0
                  inet6 addr: ::1/128 Scope:Host
                  UP LOOPBACK RUNNING MTU:65536 Metric:1
                  RX packets:56 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:1
                  RX bytes:3860 (3.7 KiB) TX bytes:3860 (3.7 KiB)

                  wlan0 Link encap:Ethernet HWaddr b8:27:eb:77:cd:f0
                  inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0
                  inet6 addr: fe80::7de7:9a5d:d32c:a5b0/64 Scope:Link
                  UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
                  RX packets:389706 errors:0 dropped:2 overruns:0 frame:0
                  TX packets:282892 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:1000
                  RX bytes:563264644 (537.1 MiB) TX bytes:25512614 (24.3 MiB)

                  ipconfig on the Win10 machine gave me...

                  C:\Users****>ipconfig

                  Windows IP Configuration

                  Ethernet adapter Ethernet:

                  Media State . . . . . . . . . . . : Media disconnected
                  Connection-specific DNS Suffix . :

                  Tunnel adapter Local Area Connection:

                  Connection-specific DNS Suffix . :
                  IPv6 Address. . . . . . . . . . . : fd2a:4e7f:9415:3a5a:4e96:1179:48a:4db2
                  Link-local IPv6 Address . . . . . : fe80::7548:d707:e15d:4124%14
                  Autoconfiguration IPv4 Address. . : 169.254.65.36
                  Subnet Mask . . . . . . . . . . . : 255.255.0.0
                  Default Gateway . . . . . . . . . :

                  Wireless LAN adapter Wi-Fi:

                  Connection-specific DNS Suffix . :
                  Link-local IPv6 Address . . . . . : fe80::c877:9c5d:ed33:4f4%8
                  IPv4 Address. . . . . . . . . . . : 10.0.0.2
                  Subnet Mask . . . . . . . . . . . : 255.255.255.0
                  Default Gateway . . . . . . . . . : 10.0.0.1

                  Tunnel adapter iphttpsinterface:

                  Connection-specific DNS Suffix . :
                  IPv6 Address. . . . . . . . . . . : fd01:3ec5:6397:1000:51d:9bf5:5fbd:42d6
                  Temporary IPv6 Address. . . . . . : fd01:3ec5:6397:1000:8862:8e26:e39f:cc0c
                  Link-local IPv6 Address . . . . . : fe80::51d:9bf5:5fbd:42d6%10
                  Default Gateway . . . . . . . . . :

                  Tunnel adapter Local Area Connection* 3:

                  Media State . . . . . . . . . . . : Media disconnected
                  Connection-specific DNS Suffix . :

                  i think you may be right about it being an issue with my network as opposed to it being a problem with the RPi...for example, I'm SSHing into right now. But i'm still experiencing some network connection issues with the RPi that i do not experience with other machines on my network...including SSH connectivity but also accessing samba shares

                  SanoS 1 Reply Last reply Reply Quote 0
                  • SanoS
                    Sano @creativename
                    last edited by

                    @creativename
                    Let's start by unplugging the ethernet cable fro the pi if you don't use it.
                    Everything seems ok besides this.

                    Don't rely on ssh or cifs to check network. Nothing says "it's good" as a ping without packet loss :)

                    Regarding your samba issue, IIRC it's a recent windows restriction that doesn't allow anonymous SMB access. So not the same issue (and not retropie fault IMHO).

                    C 1 Reply Last reply Reply Quote 0
                    • C
                      creativename @Sano
                      last edited by

                      @sano no ethernet plugged in

                      1 Reply Last reply Reply Quote 0
                      • C
                        creativename
                        last edited by

                        FYI for future seekers...

                        I disabled "WMM" wifi media mode and rebooted. i am getting better overall connectivity with all my devices (previously i could connect to them but didn't always see the IP listed in router configs "attached devices" even though they had IPs), and this also seems to have stopped me from the frequent issue of not getting SSH access

                        why did it work? not sure. but it works! maybe it was something else, but i would suggest giving it a try to people with similar probs. i don't know that WMM does much, since i haven't noticed any problems with other services since turning it off, such as netflix or streaming from my plex server

                        1 Reply Last reply Reply Quote 0
                        • G
                          grant2258 Banned
                          last edited by

                          might not be related but when i shutdown and physically take the power off overnight. My wifi stops working i have to remove the usb dongal and put it in again for the system to work again. It doesnt do this everytime just most times it does. The thing is i have to shut my pie down because its in a bartop and there is no support to turn the monitor off just a screensaver that leaves the backlight on

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.