Install SSH on Debian System

# apt-get -y update && apt-get -y install openssh-server && systemctl restart ssh

Edit sshd_config:

# nano /etc/ssh/sshd_config

Change #PermitRootLogin prohibit-password

to

PermitRootLogin yes

then save.

Restart SSH:

# systemctl restart ssh

Ubuntu SSH Install

  1. Login to your CLI via your client area service - noVNC or Xterm.js Console
  2. Run an update on your newly installed VPS:
# apt-get -y update

After Ubuntu is updated, install the SSH server:

# apt-get -y install openssh-server && systemctl restart ssh

Modify sshd_config:

# nano /etc/ssh/sshd_config

Find the line: #PermitRootLogin without-password

Delete the '#' and change to: PermitRootLogin yes

It should look something like this:

    
# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_*****_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:
 
#LoginGraceTime 2m
PermitRootLogin yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
    
  

Press CTRL + x, when asked if you want to save, press y and hit Enter.

Restart SSH Server:

# systemctl restart ssh

or

# service ssh restart

Check SSH Server Status:

# systemctl status ssh

After this, you should be able to access your VPS from any console with:

# ssh root@youripnumber
War diese Antwort hilfreich? 5 Benutzer fanden dies hilfreich (5 Stimmen)