1
0
Fork 0

Guarantee remove previous ssh config values

timestamps
dump_stack() 2018-10-06 19:56:12 +00:00
parent 792ad78b15
commit f579303bb9
1 changed files with 2 additions and 0 deletions

View File

@ -134,7 +134,9 @@ func generateImage(repo, release, path, size string) (err error) {
log.Println("Allow ssh login without password (NOTE: fixed sshd pam.d)")
stdout, stderr, _, err = runInChroot(tmpdir,
"echo auth sufficient pam_permit.so > /etc/pam.d/sshd"+
" && sed -i '/PermitEmptyPasswords/d' /etc/ssh/sshd_config"+
" && echo PermitEmptyPasswords yes >> /etc/ssh/sshd_config"+
" && sed -i '/PermitRootLogin/d' /etc/ssh/sshd_config"+
" && echo PermitRootLogin yes >> /etc/ssh/sshd_config")
if err != nil {
log.Println(stdout, stderr)