diff options
author | Robey Pointer <robey@lag.net> | 2005-04-30 19:21:43 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2005-04-30 19:21:43 +0000 |
commit | 2f2d7bdee88c9f9b14dc2495fb77d7abd1587d64 (patch) | |
tree | aed9a1f42d06889d9cdbdc0ee2dae4aceba66e13 | |
parent | bcf197d02731b9548954a6c8dcad1bb290751439 (diff) |
[project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-4]
add Transport.open_sftp_client
-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 |