- 最新
- 最多得票
- 最多評論
Hi there, the pem file will be the key required to ssh to the ec2. You will not be able to import key chain, you’ll have to use an ssh terminal program and specify this key when connecting.
Please see how to ssh from a Linux box and follow the instructions
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
Gary,
chmod 600 us-east-kp.pem ... returns 'no such file for directory' ... i imagine that .pem might be an issue, would you suggest a good way to convert the file to .12 which I believe is better on mac, thoughts?
Sounds like you’re not in the same directory as the pem file, don’t have access or the file is called something different. If you perform an ls can you see the file? You don’t need a p12 file. Both your messages say file not found. That maybe the issue here. ls the directory and see what the file name is
Gary, thx for the feedback. See below the terminal command entries, as you can see the file is visible in downloads. FYI My keychain will still not accept the file. Below I give a chmod command to make sure I have permissions, then execute an ssh connect, but i am denied permission.
"tj downloads % ls us-east-kp1.pem us-east-kp1.pem tj downloads % chmod 400 us-east-kp1.pem tj downloads % ssh -i "us-east-kp1.pem" ec2-user@ec2-xx-xxx-x-xxx.compute-1.amazonaws.com
"ec2-user@ec2-xx-xxx-x-xxx.compute-1.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic). tj downloads %"
Your thoughts?
相關內容
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
Thanks form helping Gary.
It seems that although the .pem file can be found, there is an error when I use SSH to connect, and not the expected error. I would expect..here is the error message I am getting, if that is any help at all: "~ % ssh -i "us-east-kp.pem" ec2-user@ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com Warning: Identity file us-east-kp.pem not accessible: No such file or directory. ec2-user@ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)."
Any ideas?
Thx, TJ
Try setting the file permissions on the ssh key
chmod 600 us-east-kp.pem
See if that helps
I got a bit further today, but got a 'permission denied' error message at the last minute, see below, any thoughts? ............... "tjXXXX@MacBook ~ % chmod 400 /Users/tjxxx/.ssh/us-east-kp.pem tjXXXX@MacBook ~ ~ % ssh -i ~/.ssh/us-east-kp.pem ec2-user@ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com ec2-user@ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)."