Cloud-init creates a file named `none` when given AuthorizedKeysFile none in sshd_config
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
On our AWS instances, we're using `AuthorizedKeysFile none` line in our sshd_config.
According to man page https:/
We are using an alternative approach with changing AuthorizedKeysC
Using cloud-init, that creates `none` named Files in home folders for ubuntu and root users. Here are the logs from /var/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-
```
Those `none` named files should not be created, my expectation.
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
Cloud-init Version: 0.7.5-0ubuntu1.20
tags: | added: patch |
I pushed a branch to https:/ /code.launchpad .net/~smoser/ cloud-init/ +git/cloud- init/+ref/ bug/1641574- authorizedkeysf ile-none that fixes the immeidate 'file named 'none' created" issue, but for your use case, that wont really solve the issue as cloud-init would need to correctly support dKeysCommandUse r dKeysCommand
Authorize
and
Authorize