← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1832879] [NEW] Setting user shell to zsh will not allow ssh key login

 

Public bug reported:

Selecting `/bin/zsh` as the user shell will not allow login with ssh key
or password.

user-data.yml used for the zsh
```
#cloud-config
# vim: syntax=yaml
#

hostname: hypriot
manage_etc_hosts: true

resize_rootfs: true
growpart:
    mode: auto
    devices: ["/"]
    ignore_growroot_disabled: false

users:
  - name: pirate
    gecos: "hypriot"
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/zsh
    groups: users,docker,video
    plain_text_passwd: hypriot
    lock_passwd: false
    ssh_pwauth: true
    ssh-authorized-keys:
      - <an-ssh-key>
    chpasswd: { expire: false }

package_update: true
package_upgrade: true
package_reboot_if_required: true
packages:
  - ntp
  - zsh

locale: "en_US.UTF-8"
timezone: "Europe/London"

write_files:
    - path: "/etc/docker/daemon.json"
      owner: "root:root"
      content: |
        {
          "labels": [ "os=linux", "arch=arm64" ],
          "experimental": true
        }

runcmd:
  - [ systemctl, restart, avahi-daemon ]
  - [ systemctl, restart, docker ]
```

Changing only `shell: /bin/zsh` to `shell: /bin/bash` (the default) will
allow ssh login and password login

Tested this with the hyriot OS img provided in the Hypriot site, v1.10.0

** Affects: cloud-init
     Importance: Undecided
         Status: New


** Tags: ssh

** Description changed:

- Selecting
+ Selecting `/bin/zsh` as the user shell will not allow login with ssh key
+ or password.
+ 
+ user-data.yml used for the zsh
+ ```
+ #cloud-config
+ # vim: syntax=yaml
+ #
+ 
+ hostname: hypriot
+ manage_etc_hosts: true
+ 
+ resize_rootfs: true
+ growpart:
+     mode: auto
+     devices: ["/"]
+     ignore_growroot_disabled: false
+ 
+ users:
+   - name: pirate
+     gecos: "hypriot"
+     sudo: ALL=(ALL) NOPASSWD:ALL
+     shell: /bin/zsh
+     groups: users,docker,video
+     plain_text_passwd: hypriot
+     lock_passwd: false
+     ssh_pwauth: true
+     ssh-authorized-keys: 
+       - <an-ssh-key>
+     chpasswd: { expire: false }
+ 
+ package_update: true
+ package_upgrade: true
+ package_reboot_if_required: true
+ packages:
+   - ntp
+   - zsh
+ 
+ locale: "en_US.UTF-8"
+ timezone: "Europe/London"
+ 
+ write_files:
+     - path: "/etc/docker/daemon.json"
+       owner: "root:root"
+       content: |
+         {
+           "labels": [ "os=linux", "arch=arm64" ],
+           "experimental": true
+         }
+ 
+ runcmd:
+   - [ systemctl, restart, avahi-daemon ]
+   - [ systemctl, restart, docker ]
+ ```
+ 
+ Changing only `shell: /bin/zsh` to `shell: /bin/bash` (the default) will
+ allow ssh login and password login

** Description changed:

  Selecting `/bin/zsh` as the user shell will not allow login with ssh key
  or password.
  
  user-data.yml used for the zsh
  ```
  #cloud-config
  # vim: syntax=yaml
  #
  
  hostname: hypriot
  manage_etc_hosts: true
  
  resize_rootfs: true
  growpart:
-     mode: auto
-     devices: ["/"]
-     ignore_growroot_disabled: false
+     mode: auto
+     devices: ["/"]
+     ignore_growroot_disabled: false
  
  users:
-   - name: pirate
-     gecos: "hypriot"
-     sudo: ALL=(ALL) NOPASSWD:ALL
-     shell: /bin/zsh
-     groups: users,docker,video
-     plain_text_passwd: hypriot
-     lock_passwd: false
-     ssh_pwauth: true
-     ssh-authorized-keys: 
-       - <an-ssh-key>
-     chpasswd: { expire: false }
+   - name: pirate
+     gecos: "hypriot"
+     sudo: ALL=(ALL) NOPASSWD:ALL
+     shell: /bin/zsh
+     groups: users,docker,video
+     plain_text_passwd: hypriot
+     lock_passwd: false
+     ssh_pwauth: true
+     ssh-authorized-keys:
+       - <an-ssh-key>
+     chpasswd: { expire: false }
  
  package_update: true
  package_upgrade: true
  package_reboot_if_required: true
  packages:
-   - ntp
-   - zsh
+   - ntp
+   - zsh
  
  locale: "en_US.UTF-8"
  timezone: "Europe/London"
  
  write_files:
-     - path: "/etc/docker/daemon.json"
-       owner: "root:root"
-       content: |
-         {
-           "labels": [ "os=linux", "arch=arm64" ],
-           "experimental": true
-         }
+     - path: "/etc/docker/daemon.json"
+       owner: "root:root"
+       content: |
+         {
+           "labels": [ "os=linux", "arch=arm64" ],
+           "experimental": true
+         }
  
  runcmd:
-   - [ systemctl, restart, avahi-daemon ]
-   - [ systemctl, restart, docker ]
+   - [ systemctl, restart, avahi-daemon ]
+   - [ systemctl, restart, docker ]
  ```
  
  Changing only `shell: /bin/zsh` to `shell: /bin/bash` (the default) will
  allow ssh login and password login
+ 
+ Tested this with the hyriot OS img provided in the Hypriot site, v1.10.0

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1832879

Title:
  Setting user shell to zsh will not allow ssh key login

Status in cloud-init:
  New

Bug description:
  Selecting `/bin/zsh` as the user shell will not allow login with ssh
  key or password.

  user-data.yml used for the zsh
  ```
  #cloud-config
  # vim: syntax=yaml
  #

  hostname: hypriot
  manage_etc_hosts: true

  resize_rootfs: true
  growpart:
      mode: auto
      devices: ["/"]
      ignore_growroot_disabled: false

  users:
    - name: pirate
      gecos: "hypriot"
      sudo: ALL=(ALL) NOPASSWD:ALL
      shell: /bin/zsh
      groups: users,docker,video
      plain_text_passwd: hypriot
      lock_passwd: false
      ssh_pwauth: true
      ssh-authorized-keys:
        - <an-ssh-key>
      chpasswd: { expire: false }

  package_update: true
  package_upgrade: true
  package_reboot_if_required: true
  packages:
    - ntp
    - zsh

  locale: "en_US.UTF-8"
  timezone: "Europe/London"

  write_files:
      - path: "/etc/docker/daemon.json"
        owner: "root:root"
        content: |
          {
            "labels": [ "os=linux", "arch=arm64" ],
            "experimental": true
          }

  runcmd:
    - [ systemctl, restart, avahi-daemon ]
    - [ systemctl, restart, docker ]
  ```

  Changing only `shell: /bin/zsh` to `shell: /bin/bash` (the default)
  will allow ssh login and password login

  Tested this with the hyriot OS img provided in the Hypriot site,
  v1.10.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1832879/+subscriptions


Follow ups