# SSH passwordless login not working after clean install

**URL:** <https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456>\
**Category:** RancherOS\
**Created:** [April 14, 2016, 8:19pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456 "2016-04-14T20:19:35Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Abel](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/chris_abel/32/5318_2.png) [@Chris\_Abel](https://forums.suse.com/u/Chris_Abel)\
**Post date:** [April 14, 2016, 8:19pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/1 "2016-04-14T20:19:35Z")

</div>

I’ve successfully installed RancherOS on my bare metal server with my cloud-config. I’ve configured my ssh key as follows:

“ros config set ssh\_authorized\_keys ‘[ssh-rsa AAA… [name@host.domain.com](mailto:name@host.domain.com)]’”

and install using “ros install -c /var/lib/rancher/conf/cloud-config.yml -d /dev/sd\*”

After the install, the server reboots and I am prompted to enter a username and password. When I try to ssh into the machine with rancher@ip-address, it asks for a password. The docs are saying that it should automatically log me in, but that’s not the case. The default password (rancher) is not working. I’m currently locked out of the server.

---

<div class="post-metadata">

**Author:** ![sjiveson](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/sjiveson/32/966_2.png) [@sjiveson](https://forums.suse.com/u/sjiveson)\
**Post date:** [April 15, 2016, 10:58am UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/2 "2016-04-15T10:58:21Z")

</div>

Are you certain your SSH client is presenting the SSH key you specified?

It might be worth being sure using the `-i` parameter.

---

<div class="post-metadata">

**Author:** ![Chris\_Abel](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/chris_abel/32/5318_2.png) [@Chris\_Abel](https://forums.suse.com/u/Chris_Abel)\
**Post date:** [April 19, 2016, 9:02pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/3 "2016-04-19T21:02:04Z")

</div>

Yes… Here is the output of $ssh -v -i ~/.ssh/id\_rsa.pub rancher@ip-address

> debug1: Authentications that can continue: publickey,password,keyboard-interactive  
> debug1: Next authentication method: publickey  
> debug1: Offering RSA public key: /Users/cabel/.ssh/id\_rsa.pub  
> debug1: Authentications that can continue: publickey,password,keyboard-interactive  
> debug1: Next authentication method: keyboard-interactive  
> debug1: Authentications that can continue: publickey,password,keyboard-interactive  
> debug1: Next authentication method: password

The key in /Users/cabel/.ssh/id\_rsa.pub is what I copied and pasted into my cloud-config.yml as follows:

> ros config set ssh\_authorized\_keys ‘[ssh-rsa AAA… [name@host.domain.com](mailto:name@host.domain.com)]’

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [April 21, 2016, 8:24pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/4 "2016-04-21T20:24:14Z")

</div>

@Chris_Abel What version of Rancher are you using?

Would you be willing to try with v0.4.4 that came out on Friday?

---

<div class="post-metadata">

**Author:** ![sjiveson](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/sjiveson/32/966_2.png) [@sjiveson](https://forums.suse.com/u/sjiveson)\
**Post date:** [April 22, 2016, 12:42pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/5 "2016-04-22T12:42:31Z")

</div>

I noticed while testing something entirely different today that if you’ve never logged in with an SSH key you should still be able to log in via console/serial using the usual details. Something you can try?

---

<div class="post-metadata">

**Author:** ![Chris\_Abel](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/chris_abel/32/5318_2.png) [@Chris\_Abel](https://forums.suse.com/u/Chris_Abel)\
**Post date:** [April 22, 2016, 2:12pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/6 "2016-04-22T14:12:45Z")

</div>

Not for me… Default password rancher does not work.

---

<div class="post-metadata">

**Author:** ![mandrean](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/mandrean/32/1412_2.png) [@mandrean](https://forums.suse.com/u/mandrean)\
**Post date:** [June 8, 2016, 10:11am UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/7 "2016-06-08T10:11:36Z")

</div>

I had to `chmod 400 id_rsa` first. Then it worked!

---

<div class="post-metadata">

**Author:** ![ItaiSanders](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@ItaiSanders](https://forums.suse.com/u/ItaiSanders)\
**Post date:** [July 4, 2016, 4:31pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/8 "2016-07-04T16:31:59Z")

</div>

I found out about RancherOS today and was having the same problem.  
I am using VMware Workstation, and I followed the steps from the [documentation](http://docs.rancher.com/os/running-rancheros/server/install-to-disk/).  
basically I started the vm from iso, then created the cloud-config.yml as required (without the rancher@ip, because that’s how it is in the documentation). then installed and rebooted.  
the machine itself comes up and the username and password are no longer valid (as described in the documentation).

I tried connecting using a second machine running RancherOS from iso (so I have access to the console), but I get the same results as described by @Chris_Abel. after the ssh key password it requires the rancher@ip user password, which wouldn’t work (tried the default rancher password and an empty password).

I was using the latest RancherOS version.

---

<div class="post-metadata">

**Author:** ![bdentino](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/bdentino/32/1489_2.png) [@bdentino](https://forums.suse.com/u/bdentino)\
**Post date:** [July 9, 2016, 8:31pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/9 "2016-07-09T20:31:29Z")

</div>

I’m having the same issue trying to run the recommended rancher AMI on AWS (v0.5.0). It seems that roughly 50% of the time the instance comes up with some ssh problem and I get a password prompt instead of it accepting my ssh key. Rebooting the system generally solves the problem but I have to clear the previous host key in my known\_hosts file because it has apparently changed.

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [July 12, 2016, 10:01pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/10 "2016-07-12T22:01:44Z")

</div>

@bdentino It seems like you are hitting this issue:

[https://github.com/rancher/os/issues/1090](https://github.com/rancher/os/issues/1090)

Next time you hit it, could you use the “Get System Log” and share your details in the issue?

---

<div class="post-metadata">

**Author:** ![bdentino](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/bdentino/32/1489_2.png) [@bdentino](https://forums.suse.com/u/bdentino)\
**Post date:** [July 12, 2016, 10:23pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/11 "2016-07-12T22:23:19Z")

</div>

One step ahead of you 😉  
[https://github.com/rancher/os/issues/1090#issuecomment-231842476](https://github.com/rancher/os/issues/1090#issuecomment-231842476)

---

<div class="post-metadata">

**Author:** ![beetlemist](https://avatars.discourse-cdn.com/v4/letter/b/7c8e57/32.png) [@beetlemist](https://forums.suse.com/u/beetlemist)\
**Post date:** [September 3, 2016, 12:12am UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/12 "2016-09-03T00:12:26Z")

</div>

I’m hitting the same issue when trying to connect to a newly created kvm rancheros installation on Proxmox.

Tried it with 0.5.0 yesterday, and 0.6.0 today, not quite sure what I’m doing wrong. Before rebooting to the new install I mounted the harddisk and confirmed the (correct) authorized\_key was present in /mnt/var/lib/rancher/conf/cloud-config.d/user\_config.yml. The machine seems to come up all right, but I can’t login using my ssh key.

Is there something else I need to configure in the initial cloud-config.yaml instead of the ssh key? Is there a way to enable password login for debug purposes?

---

<div class="post-metadata">

**Author:** ![imorti](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/imorti/32/2332_2.png) [@imorti](https://forums.suse.com/u/imorti)\
**Post date:** [October 3, 2016, 3:38pm UTC](https://forums.suse.com/t/ssh-passwordless-login-not-working-after-clean-install/2456/13 "2016-10-03T15:38:58Z")

</div>

I was having this issue until I ssh’d as rancher user and now I’m in!

so instead of `ssh -vv -i "<key name>" ec2-ip`

I did: `ssh -vv -i "<key name>" rancher@ec2-ip`

-I
