AWS - EC2 - Change PEM Key

by Mondorica
File type not supported

1. From the AWS EC2 Console -> Key Pairs and generate a new key pair (eg: keynew.pem); Download the generated pem key, and chmod it to 0666 2. Use the new pem key to generate a public key $ ssh-keygen -y When prompted, enter the path to keynew.pem ( /path/to/keynew.pem ) . This will generate on console not in file Touch and paste his content form generated process. Tip: Edit and append the key's name so you can identify it easier in the next steps. Just append a single space, then a tag/name for the key 3. Add the new public key to your instance $ cat /path/to/ | ssh -i /path/to/key-firstone.pem user@ip-private-from-aws "cat >> .ssh/authorized_keys" 4. Test the new key by logging in and removing the old/original key $ ssh -i /path/to/keynew.pem user@ip-private-from-aws $ nano ~/.ssh/authorized_keys Find the line containing the "original name" key and remove it.

image of username Mondorica Flag of Romania Bucharest, Romania

About Me

Experience with: AWS, Softlayer, Liniode, DigitalOcean, OVH, Godaddy, etc. ( other similar ) - OS Win Server, CentOS, UBUNTU, DEBIAN, AIX; - DNS, DHCP, AD, FS, DFS, FTP, etc.; - VMWare, Hyper-V, VirtualBox, - IIS, Apache, NGINX; - MySQL, Oracle - LOTUS, POSTFIX; - PHP, HTML , SQL; - CMS: OPENCART CPanel, CWP, Webmin, etc. ( other similar ) ******************************** IMPORTANT ******************************** 1) Escrow payment always required before i start 2) your server access details will be required on demand (ftp and mysql). 2.1) if you dont provide me server access details (if they required for the purposes described below) i wont wo rk on your project AND will be requested project cancellation. 2.2) your server access details required to test my work on your server and to see my scripts feet your server configuration. 2.3) I will start working for verified people ( ONLY ) 2.4) No Onion/TOR stuffs.

$25 USD/hr

63 reviews