![]() |
|
|
|
Banned
Join Date: Apr 2005
Location: Columbus, OH
Posts: 18,162
|
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). |
||
![]() |
|
The Unsettler
|
Is your IP address authorized for inbound traffic?
You need access to the EC2 console to enable it.
__________________
"I want my two dollars" "Goodbye and thanks for the fish" "Proud Member and Supporter of the YWL" "Brandon Won" |
||
![]() |
|
Banned
Join Date: Apr 2005
Location: Columbus, OH
Posts: 18,162
|
|||
![]() |
|
Banned
Join Date: Apr 2005
Location: Columbus, OH
Posts: 18,162
|
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). |
||
![]() |
|
The Unsettler
|
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?
__________________
"I want my two dollars" "Goodbye and thanks for the fish" "Proud Member and Supporter of the YWL" "Brandon Won" |
||
![]() |
|
Banned
Join Date: Apr 2005
Location: Columbus, OH
Posts: 18,162
|
Bah, never mind. Fixed.
|
||
![]() |
|
![]() |
Racer
Join Date: Oct 2010
Location: Franklin, TN
Posts: 5,885
|
Misspelled it as "LuckySevers.pem"?
__________________
Scott Winders PCA GT3 #3 2021 & 2022 PCA GT3 National Champion 2021 & 2022 PCA West Coast Series GT3 Champion |
||
![]() |
|
Registered
|
You need to import the key:
ssh-add -K /path/of/private/key
__________________
2021 Model Y 2005 Cayenne Turbo 2012 Panamera 4S 1980 911 SC 1999 996 Cab |
||
![]() |
|