
Generate the Public/Private key files
Now we will create the public and private key files for centos user
- su centos
- cd ~/
- ssh-keygen -b 1024 -f centos -t dsa
- cat centos.pub >> .ssh/authorized_keys
- chmod 600 .ssh/authorized_keys
- Open vi centos under /home/centos

- Copy the content vi centos

- Now make a file with the name centos.pem
- Now, you can access the server by using command :
- ssh –i centos.pem centos@IpAddressOfServer