Note: This answer only applies to old releases of Rebex SFTP and SSH components. Check out this answer for newer versions.
Instances of Sftp object can be initialized to use an existing SSH session, but Ssh and Scp don't have this capability yet. However, adding this functionality would be quite simply and we can add it into the next release if needed.
string serverName = "tcharles";
string userName = "tester0";
string password = "psw4tester";
// create a SSH session (alternatively, you can use the Session property
// of Sftp, Ssh or Scp object and skip Connect and Authenticate methods)
SshSession ssh = new SshSession();
// create an SFTP channel
SshChannel channel1 = ssh.OpenSession();
// initialize an SFTP session based on the channel
Sftp sftp1 = new Sftp();
// create another SFTP channel
SshChannel channel2 = ssh.OpenSession();
// create an SFTP session based on another channel
Sftp sftp2 = new Sftp();
// both SFTP sessions are already usable - there is no need to
// call Connect and Login methods
In the next version, we would add a new overload of the Bind method that accepts an SshSession object, making the code simpler (no need to bother with SshChannel any more).
With the current version, you can initialize an Ssh instance first and then create Sftp instance that shares the same SSH session. If you need more, please let us know and we will send you a beta when this feature is available.