1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
sudo -i sudo passwd root [ENTER] 1234 [ENTER] 1234 [ENTER] ssh-keygen -t rsa [ENTER][ENTER] cd ~/.ssh/ cat id_rsa.pub >> authorized_keys chmod 600 authorized_keys cp * /tmp/ chown ubuntu:ubuntu /tmp/*id_rs* |
Open your SFTP Client (im using WinSCP)
Login using ubuntu useraccount
Navigate your WinSCP into /tmp/
Copy this files to your PC
- id_rsa
- id_rsa.pub
- authorized_keys
Open puttygen, then click “Load” button, change file extension to All Files (*.*) then choose id_rsa without .pub
If you see dialogbox, click OK
Click “Save Private Key” button, then named it id_rsa.ppk
Testing root account
Back to WinSCP, create new server configuration. Fill root on username textfield, and left blank on password textfield.
Click Advanced button, on TreePanel you can see SSH => Authentication, navigate to your cursor into private key file then browse id_rsa.ppk was you created, Click OK
After that don’t forget to save your configuration. Click Login button, Taddaaaaaa! if success, you use a root privileges on WinSCP! congrats dud.