[ec2] Connecting as non Ubuntu User

Rolo rolo at wildfish.com
Wed Aug 26 15:23:53 BST 2009


Result!  Perms looked okay at a glance, but in checking the perms I
noticed group and owner for authorized_keys was set to root.  Changed
to my user, and now can connect fine.

Thanks loads! :>

2009/8/26 Rodney T. Quillo <imcocoy at gmail.com>:
> Kolo,
>
> If ubuntu user connects using id id_rsa(assuming this is the keypair), the
> id_rsa file should be used also by your new user to connect. Hmm maybe you
> can check also it's permission set it to 600 using chmod.
>
> Rodney
>
> On Wednesday 26 August 2009 21:18:56 Rolo M wrote:
>
>> Hiya.
>
>>
>
>> Yes, I'm trying to specify the key with -i, I've used the keypair I
>
>> launched the instance with, and my id_rsa key, and all the other keys
>
>> in .ssh for good measure.
>
>>
>
>> Also, the ubuntu@ user connects fine with no key specified, and it
>
>> defaults to id_rsa. I presumed as I copied authorized_keys from
>
>> /home/ubuntu/.ssh/ to /home/kolo/.ssh/ and ensured correct perms that
>
>> maybe its something other than the keys?
>
>>
>
>> Thanks loads for your swift reply.
>
>>
>
>> Kolo.
>
>>
>
>> 2009/8/26 Rodney T. Quillo <imcocoy at gmail.com>:
>
>> > Kolo,
>
>> >
>
>> > On SSH error, public key did you specify the keypair to be used when you
>
>> > connect to your new user?
>
>> >
>
>> > ssh -i keypair newuser at public_hostname
>
>> >
>
>> > Rodney
>
>> >
>
>> > On Wednesday 26 August 2009 19:55:11 Rolo M wrote:
>
>> >> Hiya. I've recently moved over from using the Eric Hammond images to
>
>> >>
>
>> >> the official Ubuntu ones, and am having some probs getting used to the
>
>> >>
>
>> >> new ubuntu user way of doing things. Some of these may be more
>
>> >>
>
>> >> general Linux questions so please feel free to point me elsewhere if
>
>> >>
>
>> >> this is the wrong place to ask, but any help would be greatly
>
>> >>
>
>> >> appreciated.
>
>> >>
>
>> >>
>
>> >>
>
>> >> I've launched an instance (Hardy) and I can connect fine via SSH using
>
>> >>
>
>> >> ubuntu@<hostname>. I've created two other users, one for django, to
>
>> >>
>
>> >> run my apps, and one for my username, kolo.
>
>> >>
>
>> >>
>
>> >>
>
>> >> Would it be considered the best way of doing things to continue to
>
>> >>
>
>> >> connect via the ubuntu user, and then su to my kolo user account? I
>
>> >>
>
>> >> was presuming it would be best to create a new user account to connect
>
>> >>
>
>> >> via, and then disable the ubuntu user? (is there any other problem
>
>> >>
>
>> >> with disabling the ubuntu user's SSH access?) Otherwise should I be
>
>> >>
>
>> >> telling other people working on the box would be connecting via the
>
>> >>
>
>> >> ubuntu user as well?
>
>> >>
>
>> >>
>
>> >>
>
>> >> Presuming I'm best to be connecting via my own account, I've put my
>
>> >>
>
>> >> SSH key in ~/.ssh/authorized_keys for both the ubuntu user and my own
>
>> >>
>
>> >> user, and infact I can connect with the ubuntu user and authoize with
>
>> >>
>
>> >> my key now, but when I try and user my account I get Permission denied
>
>> >>
>
>> >> (publickey). (ssh output with -v is pasted below).
>
>> >>
>
>> >>
>
>> >>
>
>> >> What am I missing? Also, if I su to another user I lose the terminal
>
>> >>
>
>> >> colours. I presume this is because it's not setting the shell
>
>> >>
>
>> >> correctly? All of my user's shells are set to /bin/bash, is there
>
>> >>
>
>> >> some other setting I'm missing? Will my ~/.bash* files get processed
>
>> >>
>
>> >> when I su?
>
>> >>
>
>> >>
>
>> >>
>
>> >> Thanks loads for any assistance! Sorry if it's a bit of a ramble.
>
>> >> Cheers.
>
>> >>
>
>> >>
>
>> >>
>
>> >> Kolo.
>
>> >>
>
>> >>
>
>> >>
>
>> >> --->
>
>> >>
>
>> >> debug1: Found key in /home/kolo/.ssh/known_hosts:17
>
>> >>
>
>> >> debug1: ssh_rsa_verify: signature correct
>
>> >>
>
>> >> debug1: SSH2_MSG_NEWKEYS sent
>
>> >>
>
>> >> debug1: expecting SSH2_MSG_NEWKEYS
>
>> >>
>
>> >> debug1: SSH2_MSG_NEWKEYS received
>
>> >>
>
>> >> 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: /home/kolo/.ssh/identity
>
>> >>
>
>> >> debug1: Offering public key: /home/kolo/.ssh/id_rsa
>
>> >>
>
>> >> debug1: Authentications that can continue: publickey
>
>> >>
>
>> >> debug1: Trying private key: /home/kolo/.ssh/id_dsa
>
>> >>
>
>> >> debug1: No more authentication methods to try.
>
>> >>
>
>> >> Permission denied (publickey).
>
>> >
>
>> > --
>
>> > Ubuntu-ec2 mailing list
>
>> > Ubuntu-ec2 at lists.ubuntu.com
>
>> > Modify settings or unsubscribe at:
>
>> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-ec2



More information about the Ubuntu-ec2 mailing list