[pve-devel] [PATCH] ssh-copy-id: never use keys provided by the ssh-agent

Stefan Priebe s.priebe at profihost.ag
Fri Feb 1 08:25:28 CET 2013


- right now ssh-copy-id uses the keys in your ssh-agent see man ssh-copy-id
- ssh-copy-id should use the local key of user root

Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
---
 data/PVE/pvecm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/PVE/pvecm b/data/PVE/pvecm
index 1b6377a..2b965df 100755
--- a/data/PVE/pvecm
+++ b/data/PVE/pvecm
@@ -396,7 +396,7 @@ __PACKAGE__->register_method ({
 	# make sure known_hosts is on local filesystem
 	PVE::Cluster::ssh_unmerge_known_hosts();
 
-	my $cmd = "ssh-copy-id 'root\@$host' >/dev/null 2>&1";
+	my $cmd = "ssh-copy-id -i /root/.ssh/id_rsa 'root\@$host' >/dev/null 2>&1";
 	system ($cmd) == 0 ||
 	    die "unable to copy ssh ID\n";
 
-- 
1.7.10.4




More information about the pve-devel mailing list