Just lost SSH access

Required Information

  • DietPi version:
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=4
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘not applicable’
  • Distro version:
    bullseye
  • Kernel version:
    Linux DietPi 3.10.38 #22 SMP PREEMPT Fri Dec 22 10:45:41 IST 2017 armv7l GNU/Linux
  • Architecture:
    armhf
  • SBC model:
    Sparky SBC (armv7l)

Issue

I’ve been working through a Docker issue and somehow just lost SSH access. I restarted all the machines involved, including my router with no luck. I’ve connected the machine in question to a monitor and keyboard and it boots up fine (running a Roon core).

My problem now is I can’t figure out how to access dietpi-software, etc. If I type shell, I get some bash commands, but I’m not familiar with these or how to make them work. I’ve tried logging into the same IP address using the same credentials as I would using Terminal, but that didn’t work. I also tried logging into localhost, but again, no dice.

The good news is Roon is still running fine, but I can fix my Docker problem because I can’t SSH into dietpi. Swimming in the deep-end with rocks in my pockets, I fear! :joy:

Not quite sure what you mean whit this.
Can you give some examples? Where to you type it and what is the response?

What exactly did you do before you lost SSH access?

And do you have a backup by any chance?

there should be no difference between direct local access and SSH access. Whatever you do on SSH, should be working exactly same way locally.

There are quite some statements on your post I don’t really understood.

what does this mean?

In general, if SSH does not work, does the SBC have network access, and is the SSH server running? Run these on the local console, i.e. attached keyboard, after logging in:

G_CHECK_NET
journalctl -u dropbear -u ssh
ss -tlpn

Okay, here’s where I’m at. With the monitor and keyboard connected, when I boot up, I see some Roon info (the reason for the dietpi) and a blinking prompt.

I then type shell which is fine.

Then I see bash-4.4# and enter ssh root@192.168.0.28

But the response I get is:
bash-4.4# ssh root@192.168.0.28
ssh: connect to host 192.168.0.28 port 22: No route to host
bash-4.4#

Okay. I was able to access dietpi.local.

Do you recommend using a static IP in the future?

Why are you doing an SSH to the very same system you are already on? Totally unnecessary. Same goes to shell command. If you login locally, you are already connected and no further commands are needed. Just use it same way as via SSH.

Anyway can you follow once connected

ip a

All fixed! IP address had changed, so wasn’t an SSH issue at all.

I sir, am an idiot! :joy:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.