![]() |
Linux (or Apple) guys, trying to SSH, won't work
I'm trying to SSH into a Linux box on Amazon Web Services. The public key is in my .ssh directory. I've adjusted the permission as directed by AWS.
When I try and connect, it says the file isn't accessible. Same result if I run the command when I'm in the .ssh directory. It doesn't seem to matter if I include a file path to the key either. Any thoughts on what I could be doing wrong? jh:~ pelicanboy$ cd .ssh jh:.ssh pelicanboy$ chmod 400 LuckyServers.pem jh:.ssh pelicanboy$ ls -l total 16 -r--------@ 1 pelicanboy staff 1692 Apr 23 11:44 LuckyServers.pem -rw-r--r-- 1 pelicanboy staff 788 Apr 27 13:25 known_hosts jh:~ pelicanboy$ ssh -i LuckySevers.pem ec2-user@54.149.XX.XX -v Warning: Identity file LuckySevers.pem not accessible: No such file or directory. Permission denied (publickey). |
Is your IP address authorized for inbound traffic?
You need access to the EC2 console to enable it. |
Quote:
|
This is the verbose output. It connects on 22.
Warning: Identity file pelicanboy/.ssh/LuckySevers.pem not accessible: No such file or directory. OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: /etc/ssh_config line 102: Applying options for * debug1: Connecting to 54.149.33.54 [54.149.33.54] port 22. debug1: Connection established. debug1: identity file /Users/pelicanboy/.ssh/id_rsa type -1 debug1: identity file /Users/pelicanboy/.ssh/id_rsa-cert type -1 debug1: identity file /Users/pelicanboy/.ssh/id_dsa type -1 debug1: identity file /Users/pelicanboy/.ssh/id_dsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.2 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2 debug1: match: OpenSSH_6.2 pat OpenSSH* debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: RSA 45:6c:b0:bb:36:b9:ea:62:e5:5f:13:5f:ff:bb:15:c5 debug1: Host '54.149.33.54' is known and matches the RSA host key. debug1: Found key in /Users/pelicanboy/.ssh/known_hosts:2 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /Users/pelicanboy/.ssh/id_rsa debug1: Trying private key: /Users/pelicanboy/.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey). |
What are the permissions on the remote key directory?
Are you the owner / logged in as the owner of the directory? EDIT: looks like you are logged in as the owner, what are the permissions? |
Bah, never mind. Fixed.
|
Misspelled it as "LuckySevers.pem"?
|
You need to import the key:
ssh-add -K /path/of/private/key |
All times are GMT -8. The time now is 06:59 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Copyright 2025 Pelican Parts, LLC - Posts may be archived for display on the Pelican Parts Website