Connect without SSH? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
gasto
Posts: 37
Joined: Fri Dec 04, 2020 2:24 am

Connect without SSH?

Post by gasto »

Hi guys,

I accidentally removed dropbear as file server and left it as "none". I figure out I now cannot connect to the dietpi command line config anymore.

Is there any way to fix this? I'm using Orange Pi Zero.
The web server and qbittorrent and all that is working normally.

Would VNC be an option?

Thanks in advance.
User avatar
WarHawk
Posts: 667
Joined: Thu Jul 20, 2017 8:55 am

Re: Connect without SSH?

Post by WarHawk »

Do you have local access to the device at all?

VNC would be a good option if it is installed

If you can VNC you should be able to open a gui to add programs such as synaptic or open a gui shell and manually run dietpi-config and re-add openssh package to the system

Otherwise you would have to side load it with

# apt install openssh-server

unfortunately if you remove your ability to get to a shell in the system and don't have physical access to the device...

dropbear is a light ssh server that only can do shell access, you can't SCP with dropbear you need openssh running for that

shell in a box is also another good idea, it's SSH thru a webgui
gasto
Posts: 37
Joined: Fri Dec 04, 2020 2:24 am

Re: Connect without SSH?

Post by gasto »

Hi warhawk,

Thanks. I do have access to the physical device, the SD card, etc.

It seems I don't have VNC server installed, I thought I had seen before that it was automatically installed during first boot.

Thanks.
User avatar
WarHawk
Posts: 667
Joined: Thu Jul 20, 2017 8:55 am

Re: Connect without SSH?

Post by WarHawk »

If you have access to physical device..then plug in a kb and monitor and shell directly from the box...install vnc and openssh

Only issue you may have with VNC on RPiZero is it would be woefully slow and use ALOT of resources

All good :)
User avatar
Joulinar
Posts: 3238
Joined: Sat Nov 16, 2019 12:49 am

Re: Connect without SSH?

Post by Joulinar »

could be hard to get a screen and keyboard connected as it's an Orange Pi Zero. I guess options are quite limited. :(
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gasto
Posts: 37
Joined: Fri Dec 04, 2020 2:24 am

Re: Connect without SSH?

Post by gasto »

Indeed, and editing dietpi.txt on the SD card to switch to dropbear again?
User avatar
Joulinar
Posts: 3238
Joined: Sat Nov 16, 2019 12:49 am

Re: Connect without SSH?

Post by Joulinar »

this will have no effect. AUTO_SETUP_SSH_SERVER_INDEX is a DietPi-Automation setting and will be applied on first boot of DietPi only, once.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gasto
Posts: 37
Joined: Fri Dec 04, 2020 2:24 am

Re: Connect without SSH?

Post by gasto »

Time to format then :/
Thanks for the answers.

Edit: let's say I connect a keyboard, which is the only thing I can connect. Would there then be any keyboard shortcuts I could use in order to get to the command prompt and activate ssh?

In windows I guess it'd be Win key + R and then CMD. Here would it be something similar?
User avatar
Joulinar
Posts: 3238
Joined: Sat Nov 16, 2019 12:49 am

Re: Connect without SSH?

Post by Joulinar »

in theory yes it would be possible to typ some commands blind.

You would need to login first with root user and password. Following should work

Code: Select all

root
<password>
# wait a few seconds to be sure to get the command line
dietpi-software install 104
# wait for 10-15 minutes. Not sure if you have an activity LED
Important: be sure on the used keyboard layout. If not changed, DietPi is using English keyboard. Because of the hyphen in dietpi-software

if all goes well you should be able to connect via SSH, even without reboot.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gasto
Posts: 37
Joined: Fri Dec 04, 2020 2:24 am

Re: Connect without SSH?

Post by gasto »

Thanks again Joulinar, do I then connect the keyboard and immediately type root? Or is there any keyboard shortcut I need to press before typing root in order to get to the command prompt?
Post Reply