From 0d5d2793ba7fa511f218a16be5cb93edbe94895d Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 6 Jul 2020 17:35:37 +0200 Subject: Fix --- gitjoe-addsshkey.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitjoe-addsshkey.pl b/gitjoe-addsshkey.pl index 7f280f9..b42f117 100755 --- a/gitjoe-addsshkey.pl +++ b/gitjoe-addsshkey.pl @@ -16,7 +16,7 @@ sub main { my $usr = $ARGV[0]; my $sshkey = $ARGV[1]; my $home_dir = '/usr/home/' . $usr . '/'; - open(my $fh, '>:encoding(UTF-8)', $home_dir . '.ssh/authorized_keys'); + open(my $fh, '>>:encoding(UTF-8)', $home_dir . '.ssh/authorized_keys'); print $fh "$sshkey\n"; close($fh); exit; -- cgit v1.2.3