Installing and Configuring SSH on Debian 12 via VNC Print

  • 0

Installing and Configuring SSH on Debian 12 via VNC

If you have access to your server via VNC but SSH is not installed, follow these steps to set it up.


1. Connect to the Server

Open the terminal in VNC and run:

vi /etc/apt/sources.list

2. Edit the Repository List

Remove any unnecessary lines and add the following:

deb https://deb.debian.org/debian bookworm main non-free-firmware
deb-src https://deb.debian.org/debian bookworm main non-free-firmware

Then save the changes:

  • Press Esc,
  • Type :wq!,
  • Press Enter.

3. Update the System

After updating the repository list, run the system update:

apt update
apt dist-upgrade

4. Install OpenSSH

Now, install the SSH server:

apt-get install openssh-server

5. Enable Root Login

Open the SSH configuration file:

vi /etc/ssh/sshd_config

Find this line:

PermitRootLogin prohibit-password

Change it to:

PermitRootLogin yes

Save the changes (Esc:wq!Enter).


6. Restart the SSH Service

Apply the changes by restarting the SSH server:

systemctl restart ssh

Done! You can now connect to your server via SSH with root access. 


Was this answer helpful?

« Back