If you don’t aware of how to set/change Permission Check this guide
$ vim ~/.ssh/config
Host srv001
HostName example.com
Port 2222
User MiteshShah
IdentityFile ~/.ssh/id_example
IdentitiesOnly yes
Host srv002
HostName 192.168.33.10
User root
PubkeyAuthentication no
Host aws
HostName some.address.ec2.aws.com
User ubuntu
IdentityFile ~/.ssh/aws_identity.pem
IdentitiesOnly yes
HostName
- The server host (domain or ipaddress)Port
- The port to use when connectingUser
- The username to log in withIdentityFile
- The SSH key identity to use to log in with, if using SSH key accessIdentitiesOnly
- Yes
to specify only attempting to log in via SSH keyPubkeyAuthentication
- No
to specify you wish to bypass attempting SSH key authentication$ ssh aws