0

I just deployed a new Fedora 17 server on the Amazon EC2. I was able to log in as ec2-user with my generated keypair, but I cannot log in under normal circumstances as a user I created. This is just a normal ssh:

ssh user@ip-address

Any ideas on what is going on here?

EDIT: This is a snippit from my sshd_config file

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
#PermitEmptyPasswords no
PasswordAuthentication no

EDIT AGAIN: This is the output of ssh -v.

OpenSSH_5.8p2, OpenSSL 1.0.0i-fips 19 Apr 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 107.23.2.165 [107.23.2.165] port 22.
debug1: Connection established.
debug1: identity file /home/psion/.ssh/id_rsa type 1
debug1: identity file /home/psion/.ssh/id_rsa-cert type -1
debug1: identity file /home/psion/.ssh/id_dsa type 2
debug1: identity file /home/psion/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 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 19:cb:84:21:a9:0e:83:96:2f:6a:fa:7d:ce:39:0f:31
debug1: Host '107.23.2.165' is known and matches the RSA host key.
debug1: Found key in /home/psion/.ssh/known_hosts:5
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,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not found

debug1: Unspecified GSS failure.  Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not found

debug1: Unspecified GSS failure.  Minor code may provide more information

debug1: Unspecified GSS failure.  Minor code may provide more information

debug1: Next authentication method: publickey
debug1: Offering DSA public key: /home/psion/.ssh/id_dsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Offering RSA public key: /home/psion/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
6
  • Why are you using an IP address instead of the EC2 public hostname?
    – ceejayoz
    May 31, 2012 at 1:16
  • Can you put forth your /etc/ssh/sshd_config? Have you checked it to see if password/interactive authentication is allowed?
    – nearora
    May 31, 2012 at 1:17
  • Elastic IP comming through the vpc
    – psion
    May 31, 2012 at 1:17
  • if you are connecting from a linux client, then the output of ssh -v user@ip-address would be helpful, otherwise enable logging and send the putty log
    – Tom
    May 31, 2012 at 1:38
  • 1
    are you using a key-pair for the new user?
    – Tom
    May 31, 2012 at 1:38

2 Answers 2

4

Interactive authentication is disabled. Your client is using the default keypair, which I assume you are using for ec2-user.

From the information you've provided it appears that you have not copied the public key to the new user's $HOME/.ssh/authorized_keys.

Either create a new key-pair for the new user and add that to your local ~/.ssh/config or copy the public key you've already generated to new user's $HOME/.ssh/authorized_keys.

1

If you are trying to use Password authentication you will need to enable it in the /etc/ssh/sshd_config;

 PasswordAuthentication yes

as it would be disabled by default;

prompt> grep PasswordAuthentication /etc/ssh/sshd_config                                                                                             
# PasswordAuthentication yes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.