Rather than try and validate this out of band, depend on sshcommand for performing any such checks on the file. There isn't any need for dokku to duplicate this when listing the contents of the file.
This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
This will allow background processes to cleanup these files if they were unable to be cleaned up during a run of the dokku binary, as is the case for files copied by the docker binary when running in docker.
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.
The command used to reprocess everything is:
```shell
shfmt -l -bn -ci -i 2 -w .
```
This is a proposed change for addressing GH #2446 "Adding a file with
two ssh-keys can result in an error" (see
https://github.com/dokku/dokku/issues/2446).
The following checks are performed:
- validity of key contents when read from a file
- key contents only contains one single line/key
- authorized_keys file is ultimately valid
The last test is an extension over the previous implementation in that
all lines in the file are checked.
The commit also includes extensions to the relevant test file to
excercise the new checks. It also takes care to save and then restore
the authorized_keys file.