예제 #1
0
 public void setKnownHosts(InputStream stream) throws JSchException {
   if (known_hosts == null) known_hosts = new KnownHosts(this);
   if (known_hosts instanceof KnownHosts) {
     synchronized (known_hosts) {
       ((KnownHosts) known_hosts).setKnownHosts(stream);
     }
   }
 }
예제 #2
0
 public void setKnownHosts(String filename) throws JSchException {
   if (known_hosts == null) known_hosts = new KnownHosts(this);
   if (known_hosts instanceof KnownHosts) {
     synchronized (known_hosts) {
       ((KnownHosts) known_hosts).setKnownHosts(filename);
     }
   }
 }