truncate auth keys files to zero, but do not remove them (permissions are set at provisioning time)

This commit is contained in:
Lloyd Hilaiel 2014-02-10 23:14:39 +02:00
Родитель 2ae779e30e
Коммит 74993c6d12
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -186,7 +186,7 @@ exports.configureProxy = function(host, behavior, cb) {
exports.makePristine = function(host, cb) {
var destination = 'ec2-user@' + host;
var rcmd = 'sudo rm ~root/.ssh/authorized_keys ~/.ssh/authorized_keys';
var rcmd = 'sudo truncate -s0 ~root/.ssh/authorized_keys ~/.ssh/authorized_keys';
var args = ['-o', 'StrictHostKeyChecking no', destination, rcmd];
passthrough(child_process.execFile(ssh, args, cb));
};