Based on OS : Window : 1. Use git bash and locate the location where the pem file is present. cmd : chmod 400 "name.pem" https://i.sstatic.net/xZsTl7iI.png 2. Use ssh -i "location of pem file" username@publicIP i.e. ssh -i "python.pem" ubuntu:107.X.X.X Linux Ubuntu: Follow the same step with the terminal.