Public bug reported:

On our AWS instances, we're using `AuthorizedKeysFile none` line in our
sshd_config.

According to man page https://www.freebsd.org/cgi/man.cgi?sshd_config(5)
"Alternately this option may be set to ``none'' to skip checking for
user keys in files."

We are using an alternative approach with changing AuthorizedKeysCommand
that's why we don't want to have a specific AuthorizedKeysFile.

Using cloud-init, that creates `none` named Files in home folders for
ubuntu and root users. Here are the logs from /var/log/cloud-init.log:

```
2016-11-01 05:35:50,685 - util.py[DEBUG]: Writing to /home/ubuntu/none - wb: 
[384] 391 bytes
2016-11-01 05:35:50,685 - util.py[DEBUG]: Changing the ownership of 
/home/ubuntu/none to 1000:1000
2016-11-01 05:35:50,686 - util.py[DEBUG]: Writing to /root/none - wb: [384] 546 
bytes
2016-11-01 05:35:50,686 - util.py[DEBUG]: Changing the ownership of /root/none 
to 0:0
Nov  1 05:36:44 network-tinyproxy [CLOUDINIT] util.py[DEBUG]: Reading from 
/home/ubuntu/none (quiet=False)
Nov  1 05:36:44 network-tinyproxy [CLOUDINIT] util.py[DEBUG]: Read 391 bytes 
from /home/ubuntu/none
```

The contents of the none files are:
~$ cat /home/ubuntu/none
```
ssh-rsa <ssh_key> <ssh_key_name> 
```
~# cat /root/none
```
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please 
login as the user \"ubuntu\" rather than the user \"root\".';echo;sleep 10" 
ssh-rsa <ssh_key> <ssh_key_name>
```

Those `none` named files should not be created, my expectation.

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"

Cloud-init Version: 0.7.5-0ubuntu1.20

** Affects: cloud-init (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1641574

Title:
  Cloud-init creates a file named `none` when given AuthorizedKeysFile
  none in sshd_config

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to