[Bug 436] New: SSH client API

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Nov 15 01:33:34 EST 2002


http://bugzilla.mindrot.org/show_bug.cgi?id=436

           Summary: SSH client API
           Product: Portable OpenSSH
           Version: 3.5p1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: ssh
        AssignedTo: openssh-unix-dev at mindrot.org
        ReportedBy: jensus at linux.nu


I would be usefull to have an API for the SSH client, 
so it could be used from other programs.

Java-stype pseudo code:

// create connections and forward ports
SSHClient ssh = new SSHClient();
ssh.setUserAuthenticationHandler(new PasswordDialog());
ssh.setHostAuthenticationHandler(this);
SSHSocket con = ssh.connect("127.0.0.1");
con.getOutputStream().write("hello".getBytes());
ssh.localForward(80, "www.google.com", 80);
ssh.remoteForward(80, "www.google.com", 80);

// access configuration
SSHConfiguration sshConfig = ssh.getConfiguration();
SSHHostConfiguration hc = sshConfig.getHostConfiguration("*.ssh.box");
hc.setForwardX11(true);
sshConfig.write();

// manage keys
SSHKey key = SSHKeymanager.createKey(SSHKey.DSA, "apan-ola at foo.bar");
key.write("key1"); // creates ~/.ssh/key1 and ~/.ssh/key1.pub
SSHKeymanager.removeKey("key1");
Collection keys = SSHKeymanager.listKeys();



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the openssh-unix-dev mailing list