Root User for Linux

0

I am not very fluent in using Linux at the command line. With that in mind, I set up Plesk on my Lightsail instance, and it is working great. What I am trying to do is migrate some websites from a colleague's AWS Lightsail instance which is also running Plesk. I have used this migration tool before, and it works very well once you get the servers authenticated and a connection established. Unfortunately, to do this, I have the option of providing the root user and password for the source server, or I can use SSH keys as credentials. We tried a few different combinations of credentials he uses to sign in to his AWS account, and to sign in to his Plesk dashboard, but nothing will work. I do not have enough familiarity with SSH keys to make a very educated guess on how to proceed, so I am hoping to simply figure out how to get or change the password for his root user. I do not think this is the same as the "root" user credentials I use to sign in to my AWS console. Why does this seem so complicated? When I have had a VPS with other providers in the past, I could usually get a root user password and this migration tool just works.

I know this will require him (my colleague) to connect to his server, which I do not have credentials for at this point. He is willing to give me control for the period required to complete the migration, then he will change passwords again. What I am hoping for is a simple method for changing the root user password, and whether this would cause any issues by changing it, as long as he has it. Would this cause any issues between the VPS and the AWS console as far as administration goes? Any help or suggestions would be greatly appreciated. I have been working on this for over a week with no real progress. I am running out of time.

asked 2 years ago707 views
1 Answer
1

I would suggest that using the root user or obtaining a password for it isn't a great idea as it could lead to a significant security compromise.

However, setting up SSH access using keys isn't anywhere as difficult as it seems. You need to generate a keypair (public and private) on your system; and then put the public key on your colleague's system. That's it. There are many pages describing how to do this including this one: https://www.linuxshelltips.com/passwordless-ssh-login/

profile pictureAWS
EXPERT
answered 2 years ago
  • Thank you for the suggestion, Brett. I am trying to work through the steps. All of Step 1 worked as expected. I am unclear how to get the public key copied to the source server (the one I am trying to migrate the sites from). When I try to use the ssh-copy-id command, it returns all of this:

    /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub" /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@52.41.45.66: Permission denied (publickey).

    So, I am stuck here. Any suggestions? Can I download the id_rsa.pub file (which does show up in my .ssh directory), and send it to the admin of the other server? How can he import it once he has it? Would it work to import it through the AWS console, or through the SSH terminal?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions