How to configure source server to accept SSH connections and allow user root during a migration process? - Support Cases from Plesk Knowledge Base (2024)
How to configure source server to accept SSH connections and allow user root during a migration process?
Answer
By default, SSH server is mainly configured to allow root user to log in. However, it may have been reconfigured to have root logins disabled as a security measure.
Note: 'root' user is disabled by default on AWS instances and Ubuntu.
Make sure that the configuration file /etc/ssh/sshd_config has parameters PermitRootLogin and PasswordAuthentication are set to yes and not prepended by # symbol. Otherwise, open /etc/ssh/sshd_config in text editor and perform the necessary changes to look as below:
Note: Before making this change, make sure that the password for user root is sufficiently complex (no less than 12 characters long, including numbers, upper/lowercase letters, and special symbols). Change the password if necessary.
Restart SSH server if any configuration changes have been made:
# service sshd restart
If the server has a firewall, it should be configured to allow incoming SSH connections from Plesk server.
Review files /etc/hosts.allow and /etc/hosts.deny for any rules that may prevent access to SSH service from destination Plesk server. For example, if access to sshd service is denied in hosts.deny:
sshd: ALL
ALL: ALL
Then, hosts.allow should have a record which would allow SSH access from destination server:
sshd: 192.0.2.2 192.0.2.3 : allow
Note: Replace IP addresses above with IP address of destination server. If destination server has several IP addresses, put all of them in one line, separated by spaces.
The usermod command adds users to the root group and provides root privileges. It allows you to modify user account details, including group membership. The useradd command with appropriate options can create a new user account and assign it to the root group during user creation, effectively granting root privileges.
The usermod command adds users to the root group and provides root privileges. It allows you to modify user account details, including group membership. The useradd command with appropriate options can create a new user account and assign it to the root group during user creation, effectively granting root privileges.
SSH keys are a matching set of cryptographic keys which can be used for authentication. Each set contains a public and a private key. The public key can be shared freely without concern, while the private key must be vigilantly guarded and never exposed to anyone.
The SSH config file is divided into Host sections with specific configuration options for every host. The argument is the exact hostname, IP address, or a match pattern. Use whitespace as a separator between parameters and arguments or an equals sign ( = ).
To initiate an SSH connection to a remote system, you need the Internet Protocol (IP) address or hostname of the remote server and a valid username. You can connect using a password or a private and public key pair. Because passwords and usernames can be brute-forced, it's recommended to use SSH keys.
SSH (Secure Shell) is often used for logging into remote servers as root. However, the default configuration in OpenSSH prevents root login using passwords. To enable root login, change the value of the PermitRootLogin configuration option in /ssh/sshd_config.
Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379
Phone: +2678139151039
Job: International Administration Supervisor
Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports
Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.