Connect Custom Server

Connect Custom Server

  • 2023-02-08 23:34:31

Video tutorial

  1. Go to server creation page
  2. Click on Custom Server
  3. Enter Server Name: is the server name
  4. Enter the server's IP v4
  5. Select the authentication type as Password or SSH Key
    1. If it is Password: enter SSH Password of the rootaccount
    2. If it is SSH Key: Select the private key file and enter the passphrase (if any)
      If the OpenSSH private key file with the FlashVPS passphrase cannot be read, please remove the passphrase from the key with the command:ssh-keygen -p -f path_to_private_key
  6. Select the apps to install initially
  7. Click add server and you're done.

In case the root account is disabled login (OVH)

Some server providers disable the root user by default, instead have 1 user account, for example ubuntu, and this user can be sudo

To allow root login you do the following

  1. SSH Login to the server provider account created when initializing the vps, for example ubuntu
  2. Then copy the command below and paste it in the terminal
    if [ "$EUID" -ne 0 ]; then
        sudo su
    # Find the line in the file that contains "PermitRootLogin"
    line1=$(grep -n -m 1 "^#*\s*PermitRootLogin" /etc/ssh/sshd_config | cut -d: -f1)
    # Replace the line with "PermitRootLogin yes"
    sed -i "${line1}s/.*/PermitRootLogin yes/" /etc/ssh/sshd_config
    # Find the line in the file that contains "PasswordAuthentication"
    line2=$(grep -n -m 1 "^#*\s*PasswordAuthentication" /etc/ssh/sshd_config | cut -d: -f1)
    # Replace the line with "PasswordAuthentication yes"
    sed -i "${line2}s/.*/PasswordAuthentication yes/" /etc/ssh/sshd_config
    # Restart the ssh service to apply the changes
    systemctl restart ssh
    # Change the root password
    sudo passwd root

Go back to FlashVPS Panel and connect as instructed above.

Please login as the user "ubuntu" rather than the user "root" (AWS)

For AWS servers, when you log in with the root account, there will be a message like this and the connection will be lost. Please log in to your ubuntu account and execute the following command.

sudo su
sed -i -e 's/.*exit 142" \(.*$\)/\1/' /root/.ssh/authorized_keys
Author FlashPanel Admin
FlashPanel Admin
Joined in 3 years ago