> @@ -128,23 +132,44 @@ public JschSshClient(ProxyConfig proxyConfig, 
> BackoffLimitedRetryHandler backoff
>        this.user = checkNotNull(loginCredentials, 
> "loginCredentials").getUser();
>        this.host = checkNotNull(socket, "socket").getHostText();
>        checkArgument(socket.getPort() > 0, "ssh port must be greater then 
> zero" + socket.getPort());
> -      checkArgument(loginCredentials.getPassword() != null || 
> loginCredentials.getPrivateKey() != null,
> -               "you must specify a password or a key");
> +      checkArgument(loginCredentials.getPassword() != null || 
> hasValidPrivateKey(loginCredentials) || getSSHAgentConnector() != null,
> +               "you must specify a password, a key or an SSH agent needs to 
> be present");

Maybe "available" would be clearest?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/312/files#r10861216

Reply via email to