Skip Menu |

This queue is for tickets about the SSH-Batch CPAN distribution.

Report information
The Basics
Id: 125454
Status: new
Priority: 0/
Queue: SSH-Batch

People
Owner: Nobody in particular
Requestors: gdo [...] perldev.leader.it
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: key2nodes path to not insert already existing public keys
key2nodes add multiple rows of the same key if the key is already presents. With this path the script check if the key is already interted: root@test:~# diff /usr/local/bin/key2nodes /usr/local/bin/key2nodes.ORIGINAL 165,182c165 < }, q{ < read PUBLIC_KEY < if [ ! -d ~/.ssh ] < then < mkdir ~/.ssh < chmod 700 ~/.ssh < fi < if [ ! -f ~/.ssh/authorized_keys ] < then < touch ~/.ssh/authorized_keys < chmod 640 ~/.ssh/authorized_keys < fi < if [ -z "$(grep "$PUBLIC_KEY" ~/.ssh/authorized_keys)" ] < then < echo $PUBLIC_KEY >> ~/.ssh/authorized_keys < fi < }); < --- Show quoted text
> }, }, 'if [ ! -d ~/.ssh ]; then mkdir ~/.ssh; fi; chmod 700 ~/.ssh; cat >> ~/.ssh/authorized_keys && chmod 640 ~/.ssh/authorized_keys');
root@test:~#