Setting up EC2 the default login is root with a pub/priv key generated on the EC2 site as keypairs. I do not want to log in a root directly and disable this on the server. After a bit of searching I found this site that explained the process.
The problem with this method is there are a few errors and also once you do this you are screwed, because you cannot su to root!!!.
So new procedure is below
1) Change the root password!!!!
2) follow these steps
(Need a password here)
ssh-keygen -b 1024 -f des -t dsa
(Need a passphrase here)
chmod 700 .ssh
chown des:des .ssh
cp /root/des* .ssh/
chown des:des .ssh/des
chown des:des .ssh/des.pub
cat /root/des.pub > .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
chown des:des .ssh/authorized_keys
test if it works
ssh -i /home/des/.ssh/des -l des sfx.carrierfx.com
copy key to local machine. Easiest is to print it out and copy it to a text file on local machine as des.pem
That’s it. Once this works fine, then change the
Leave a comment
No comments yet.