diff options
-rw-r--r-- | paramiko/transport.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py index a1ea5ae1..da252ce7 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -28,6 +28,7 @@ from common import * from ssh_exception import SSHException from message import Message from channel import Channel +from sftp_client import SFTPClient import util from rsakey import RSAKey from dsskey import DSSKey @@ -161,6 +162,8 @@ class BaseTransport (threading.Thread): 'diffie-hellman-group-exchange-sha1': KexGex, } + # READ the secsh RFC's before raising these values. if anything, + # they should probably be lower. REKEY_PACKETS = pow(2, 30) REKEY_BYTES = pow(2, 30) @@ -553,6 +556,18 @@ class BaseTransport (threading.Thread): self.lock.release() return chan + def open_sftp_client(self): + """ + Create an SFTP client channel from an open transport. On success, + an SFTP session will be opened with the remote host, and a new + SFTPClient object will be returned. + + @return: a new L{SFTPClient} object, referring to an sftp session + (channel) across this transport + @rtype: L{SFTPClient} + """ + return SFTPClient.from_transport(self) + def send_ignore(self, bytes=None): """ Send a junk packet across the encrypted link. This is sometimes used |