Connect SSH or RDP

I am attempting to connect to the Raspberry Pi via ssh and rdp is this possible with octoprint already installed?

I am using the credentials that i sign in on with the browser to access but i get Access Denied

Thanks for any help


SSH: Yes.
RDP: I think not per default.

The credential for the CLI are different.
The default is pi/raspberry.

@Ewald_Ikemann thanks i tried that also still same issue..



Keep in mind that OctoPi SSH expects an English keyboard lay out. Some keys are swapped wit other layouts.

OctoPrint can be installed on just about any system that has Python 3. Therefore, it has its own authentication, username(s) / password(s), which is independent from the operating system on which it is installed. These are used to sign in with the browser.

SSH and RDP are protocols that are implemented on the operating system (OS) and will use the credentials associated with that OS which are completely separate from the OctoPrint credentials.

If you are using OctoPi as your operating system, the username (and password) could be entered as you flash the microSD card. The defaults are "pi" and "raspberry" but could be anything you choose. I believe it is recommended to keep the username as "pi".

OctoPi does not have the desktop environment installed by default so only SSH is available initially. There is a script provided to install the desktop environment and RDP can be installed after installing the desktop.

RDP will not work. If you install the desktop and want a "remote desktop", you have to use VNC

When the pi boots up, you have to turn on the desktop.

sudo apt-get install --reinstall ubuntu-desktop

then reboot.

Now, this is for Ubuntu linux and there are different flavors. I haven't done enough research to find out what the Octoprint pi image is using. I do know some things have been moved around a little bit. manual updates of Python and other things might need to be done manually.

I have run an Orange pi with Ubuntu w/desktop and manual install of Octoprint manually. It worked ok. I would definitely run at least a pi 3 8g of ram and a minimum of a 32g sd card, harddrive, or SSD.

The desktop uses more resources. 5ft24 is correct, VNC for remote desktop.

sudo apt install tightvncserver

Now, if you are going this far, I suggest running Cura or what ever slicer on there too.

  • download modern linux version of cura from ultimaker website
  • go into the downloads section of Ubuntu and made the .appimage file executable
  • right click on .appimage file and click "run"

Good luck,

I have tried with VNC also but it still refuses connection



Thanks for your response

I tired to use RealVnc viewer but still get connection refused


What OS are you actually running?

1 Like

You have to ssh to the pi, and sudo raspi-config then go to interfaces then VNC and select yes to enable it
You also have to run the script that installs the desktop first

as i mentioned i am not able to ssh to the pi the credentials i use for the "browser connect to octopi" will not be accepted by the ssh connection attempt


The credentials for SSH the username is pi, the password is raspberry

And did you load the Octopi image to the SD card, or did you load another OS like ubuntu and then install octoprint on top of it? If you are using another OS, you are just asking for issues to crop up.
Download the latest Octopi image, burn it to the SD card with the pi imager after setting the password, wifi information etc, go to the settings tab and make sure that ssh is enabled, save, then write.

The octopi was its own image on the SD. As I originally mentioned i have the non default credentials that i use to login via browser . but I am not able to ssh with those credentials or the "default" pi/raspberry


I'd suggest that you use the OctoPrint Backup & Restore to create a backup of your existing configuration. Make sure to download this file.

Since you can't use SSH or a keyboard, mouse, and monitor to login to your system, it is unlikely there are any other files to save.

Use the Raspberry Pi Imager and write a new image onto your microSD card. Use OS customization, edit settings, and set the username to "pi" and a password of your choosing (pick one you can remember or write it down). You can also configure your wireless and locale settings. Under services, you can verify that SSH is enabled.

When you boot with this microSD card, it will run the OctoPrint first run setup and you will have to reenter the browser username and password which can be the same as the system username and password you selected in the RPi imager or they can be different. If you are the only person using OctoPrint, then there is no need to make them different. If others use it, then make them different (and easy for you to remember or write them down).

During the first run setup, you can restore the backup you created initially and when that completes, you should be back in business with the additional ability of connecting with SSH.

Do you actually have ssh enabled on the Pi sd card?, historically [up to a couple of years ago], and depending upon the version installed, you had to manually enable ssh on the SD card before putting into the Pi. Or enable ssh by using sudo raspi-config, but this can only be done if you can get to the GUI or the login prompt :-(.
To enable ssh on an old raspberry pi image, shutdown and remove the card, put it in your computer in a reader and wait for the two partitions to appear as they mount. There's a root partition - that contains the operating system and octoprint and everything else. The other partition is /boot.

Open a terminal window and find the /boot partition if you have a debian desktop it will be in /media/youruserid/boot. Then simply run 'sudo touch ssh'. This creates an empty file, but it tells the Pi operating system to start the ssh service when the Pi boots.
You can see this from the command line when you run 'sudo net stat -tulnp', this will list all the open ports and their associated programs, but first you need ssh running.

Put the sd card back into the Pi and restart, your ssh session should now work.
Search ssh without password and you'll not even have to type in the username/password to connect.

N.B. I always use the Raspberry Pi Imager to cut new cards, you can set the hostname/username/password/enable ssh all in one go before using the card.
The best way to recreate an existing octoprint instance is to create a backup, download that.
Build the new octoprint sd card with Pi Imager, restart the Pi with the new card and restore the backup, the Octoprint backup process is excellent BTW.

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