]> git.proxmox.com Git - pve-client.git/blobdiff - PVE/APIClient/Commands/remote.pm
allow to setup remotes without password
[pve-client.git] / PVE / APIClient / Commands / remote.pm
index e8c876a7259921cff5f83452537f828e66985063..781fb63818ca4104d1d4167161dbef12364c14ff 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,
        };