allow to setup remotes without password
[pve-client.git] / PVE / APIClient / Commands / remote.pm
index e8c876a..781fb63 100644 (file)
@@ -61,9 +61,14 @@ __PACKAGE__->register_method ({
 
        my $last_fp = 0;
 
+       my $password = $param->{password};
+       if (!defined($password)) {
+           $password = PVE::PTY::read_password("Remote password: ");
+       }
+
        my $setup = {
            username                => $param->{username},
-           password                => $param->{password},
+           password                => $password,
            host                    => $param->{host},
            port                    => $param->{port} // 8006,
        };