From 3971917d2b7ce37973ed0db8847e745a37ccbf02 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Sun, 23 Oct 2011 00:00:43 -0700 Subject: [PATCH] Initial rename: paramiko=>ssh --- .bzrignore | 4 +- .gitignore | 2 +- ChangeLog.1 | 480 ++++++++++++++--------------- Makefile | 12 +- NEWS | 4 +- README | 21 +- demos/demo.py | 36 +-- demos/demo_server.py | 36 +-- demos/demo_sftp.py | 22 +- demos/demo_simple.py | 18 +- demos/forward.py | 18 +- demos/interactive.py | 8 +- demos/rforward.py | 18 +- images/paramiko-banner.psd | Bin 52177 -> 52173 bytes setup.py | 14 +- setup_helper.py | 8 +- {paramiko => ssh}/__init__.py | 16 +- {paramiko => ssh}/agent.py | 14 +- {paramiko => ssh}/auth_handler.py | 18 +- {paramiko => ssh}/ber.py | 8 +- {paramiko => ssh}/buffered_pipe.py | 8 +- {paramiko => ssh}/channel.py | 28 +- {paramiko => ssh}/client.py | 28 +- {paramiko => ssh}/common.py | 8 +- {paramiko => ssh}/compress.py | 8 +- {paramiko => ssh}/config.py | 8 +- {paramiko => ssh}/dsskey.py | 20 +- {paramiko => ssh}/file.py | 8 +- {paramiko => ssh}/hostkeys.py | 14 +- {paramiko => ssh}/kex_gex.py | 18 +- {paramiko => ssh}/kex_group1.py | 16 +- {paramiko => ssh}/logging22.py | 8 +- {paramiko => ssh}/message.py | 12 +- {paramiko => ssh}/packet.py | 16 +- {paramiko => ssh}/pipe.py | 8 +- {paramiko => ssh}/pkey.py | 18 +- {paramiko => ssh}/primes.py | 12 +- {paramiko => ssh}/resource.py | 8 +- {paramiko => ssh}/rsakey.py | 20 +- {paramiko => ssh}/server.py | 18 +- {paramiko => ssh}/sftp.py | 20 +- {paramiko => ssh}/sftp_attr.py | 12 +- {paramiko => ssh}/sftp_client.py | 20 +- {paramiko => ssh}/sftp_file.py | 18 +- {paramiko => ssh}/sftp_handle.py | 14 +- {paramiko => ssh}/sftp_server.py | 20 +- {paramiko => ssh}/sftp_si.py | 14 +- {paramiko => ssh}/ssh_exception.py | 10 +- {paramiko => ssh}/transport.py | 50 +-- {paramiko => ssh}/util.py | 24 +- {paramiko => ssh}/win_pageant.py | 8 +- test.py | 12 +- tests/loop.py | 8 +- tests/stub_sftp.py | 10 +- tests/test_auth.py | 14 +- tests/test_buffered_pipe.py | 12 +- tests/test_client.py | 60 ++-- tests/test_file.py | 10 +- tests/test_hostkeys.py | 24 +- tests/test_kex.py | 56 ++-- tests/test_message.py | 10 +- tests/test_packetizer.py | 14 +- tests/test_pkey.py | 12 +- tests/test_sftp.py | 40 +-- tests/test_sftp_big.py | 12 +- tests/test_transport.py | 18 +- tests/test_util.py | 30 +- 67 files changed, 796 insertions(+), 797 deletions(-) rename {paramiko => ssh}/__init__.py (91%) rename {paramiko => ssh}/agent.py (92%) rename {paramiko => ssh}/auth_handler.py (97%) rename {paramiko => ssh}/ber.py (93%) rename {paramiko => ssh}/buffered_pipe.py (95%) rename {paramiko => ssh}/channel.py (98%) rename {paramiko => ssh}/client.py (96%) rename {paramiko => ssh}/common.py (93%) rename {paramiko => ssh}/compress.py (78%) rename {paramiko => ssh}/config.py (93%) rename {paramiko => ssh}/dsskey.py (92%) rename {paramiko => ssh}/file.py (98%) rename {paramiko => ssh}/hostkeys.py (96%) rename {paramiko => ssh}/kex_gex.py (94%) rename {paramiko => ssh}/kex_group1.py (92%) rename {paramiko => ssh}/logging22.py (83%) rename {paramiko => ssh}/message.py (96%) rename {paramiko => ssh}/packet.py (97%) rename {paramiko => ssh}/pipe.py (93%) rename {paramiko => ssh}/pkey.py (96%) rename {paramiko => ssh}/primes.py (93%) rename {paramiko => ssh}/resource.py (89%) rename {paramiko => ssh}/rsakey.py (92%) rename {paramiko => ssh}/server.py (98%) rename {paramiko => ssh}/sftp.py (91%) rename {paramiko => ssh}/sftp_attr.py (95%) rename {paramiko => ssh}/sftp_client.py (97%) rename {paramiko => ssh}/sftp_file.py (97%) rename {paramiko => ssh}/sftp_handle.py (95%) rename {paramiko => ssh}/sftp_server.py (97%) rename {paramiko => ssh}/sftp_si.py (97%) rename {paramiko => ssh}/ssh_exception.py (91%) rename {paramiko => ssh}/transport.py (98%) rename {paramiko => ssh}/util.py (93%) rename {paramiko => ssh}/win_pageant.py (94%) diff --git a/.bzrignore b/.bzrignore index 6ce9d80..670a453 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1,7 +1,7 @@ *.pyc ./build -./paramiko.egg-info +./ssh.egg-info ./dist ./.project -./paramiko.tmproj +./ssh.tmproj ./test.log diff --git a/.gitignore b/.gitignore index f9b7023..1273a70 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ *.pyc build/ dist/ -paramiko.egg-info/ +ssh.egg-info/ diff --git a/ChangeLog.1 b/ChangeLog.1 index 2fdae5a..282e95a 100644 --- a/ChangeLog.1 +++ b/ChangeLog.1 @@ -12,7 +12,7 @@ remove some epydoc comments about fileno() being non-portable. modified files: - paramiko/channel.py + ssh/channel.py 2005-04-18 00:30:52 GMT Robey Pointer patch-163 @@ -26,7 +26,7 @@ modified files: - paramiko/sftp_client.py tests/test_sftp.py + ssh/sftp_client.py tests/test_sftp.py 2005-04-18 00:11:34 GMT Robey Pointer patch-162 @@ -38,7 +38,7 @@ avoid using os.environ['HOME'], which will never work on windows, and use os.path.expanduser() instead. it's semi-moot because windows doesn't - have a standard location for ssh files, but i think paramiko should set a + have a standard location for ssh files, but i think ssh should set a good example anyway. modified files: @@ -68,7 +68,7 @@ modified files: - README paramiko/server.py + README ssh/server.py new patches: robey@lag.net--2003-public-master-shake/secsh--dev--1.0--base-0 @@ -85,7 +85,7 @@ bump version to 1.3 / marowak modified files: - Makefile README paramiko/__init__.py paramiko/transport.py + Makefile README ssh/__init__.py ssh/transport.py setup.py @@ -99,7 +99,7 @@ clean up SFTPAttributes repr() a bit. modified files: - paramiko/sftp_attr.py + ssh/sftp_attr.py 2005-04-10 00:13:54 GMT Robey Pointer patch-158 @@ -129,8 +129,8 @@ lots of little doc fixups (mostly indenting). modified files: - paramiko/server.py paramiko/sftp_server.py paramiko/sftp_si.py - paramiko/transport.py tests/stub_sftp.py + ssh/server.py ssh/sftp_server.py ssh/sftp_si.py + ssh/transport.py tests/stub_sftp.py 2005-03-26 05:53:00 GMT Robey Pointer patch-156 @@ -158,7 +158,7 @@ .arch-ids/demo_windows.py.id demo_windows.py modified files: - MANIFEST.in README paramiko/channel.py + MANIFEST.in README ssh/channel.py 2005-03-25 20:06:56 GMT Robey Pointer patch-155 @@ -171,7 +171,7 @@ fix a bug where packets larger than about 12KB would cause the session to die on platforms other than osx. turns out that on most platforms, setting a socket timeout also causes timeouts to occur on writes (but not on osx). so - on a huge write, once the os buffers were full, paramiko would get a + on a huge write, once the os buffers were full, ssh would get a socket.timeout exception when writing, and bail. since the timeout is primarily so we can periodically poll to see if the @@ -179,7 +179,7 @@ continue trying to write. large packet sizes (in sftp) should now work. modified files: - paramiko/transport.py + ssh/transport.py 2005-02-28 08:06:08 GMT Robey Pointer patch-154 @@ -195,16 +195,16 @@ modified files: Makefile README demo.py demo_server.py demo_simple.py - demo_windows.py forward.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/ber.py paramiko/channel.py - paramiko/common.py paramiko/dsskey.py paramiko/file.py - paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/logging22.py paramiko/message.py paramiko/pkey.py - paramiko/primes.py paramiko/rsakey.py paramiko/server.py - paramiko/sftp.py paramiko/sftp_attr.py paramiko/sftp_client.py - paramiko/sftp_handle.py paramiko/sftp_server.py - paramiko/sftp_si.py paramiko/ssh_exception.py - paramiko/transport.py paramiko/util.py setup.py test.py + demo_windows.py forward.py ssh/__init__.py + ssh/auth_transport.py ssh/ber.py ssh/channel.py + ssh/common.py ssh/dsskey.py ssh/file.py + ssh/kex_gex.py ssh/kex_group1.py + ssh/logging22.py ssh/message.py ssh/pkey.py + ssh/primes.py ssh/rsakey.py ssh/server.py + ssh/sftp.py ssh/sftp_attr.py ssh/sftp_client.py + ssh/sftp_handle.py ssh/sftp_server.py + ssh/sftp_si.py ssh/ssh_exception.py + ssh/transport.py ssh/util.py setup.py test.py tests/loop.py tests/stub_sftp.py tests/test_file.py tests/test_kex.py tests/test_message.py tests/test_pkey.py tests/test_sftp.py tests/test_transport.py @@ -225,7 +225,7 @@ modified files: - paramiko/file.py paramiko/sftp_file.py tests/test_sftp.py + ssh/file.py ssh/sftp_file.py tests/test_sftp.py 2005-02-28 07:17:21 GMT Robey Pointer patch-152 @@ -238,7 +238,7 @@ stupid little doc fixups that didn't fit with the other patches. modified files: - paramiko/auth_transport.py tests/loop.py + ssh/auth_transport.py tests/loop.py 2005-02-28 07:16:22 GMT Robey Pointer patch-151 @@ -257,7 +257,7 @@ modified files: - paramiko/transport.py + ssh/transport.py 2005-02-28 07:14:11 GMT Robey Pointer patch-150 @@ -276,7 +276,7 @@ anything. it just makes me feel better. modified files: - paramiko/channel.py + ssh/channel.py 2005-02-28 07:09:02 GMT Robey Pointer patch-149 @@ -287,14 +287,14 @@ secsh--dev--1.0--patch-149 add a logging filter that reports the thread-id of the logger, and use - that for all paramiko logging. since thread-local stuff didn't appear + that for all ssh logging. since thread-local stuff didn't appear until python 2.4, i hacked up my own little version to assign incrementing numbers to threads as they log. modified files: - paramiko/channel.py paramiko/sftp.py paramiko/sftp_client.py - paramiko/sftp_server.py paramiko/transport.py paramiko/util.py + ssh/channel.py ssh/sftp.py ssh/sftp_client.py + ssh/sftp_server.py ssh/transport.py ssh/util.py 2005-02-26 21:12:43 GMT Robey Pointer patch-148 @@ -320,7 +320,7 @@ bump version stuff to 1.2 / lapras. modified files: - Makefile README paramiko/__init__.py paramiko/transport.py + Makefile README ssh/__init__.py ssh/transport.py setup.py @@ -335,7 +335,7 @@ modified files: - README paramiko/dsskey.py paramiko/rsakey.py + README ssh/dsskey.py ssh/rsakey.py tests/test_transport.py @@ -353,7 +353,7 @@ modified files: - README paramiko/channel.py paramiko/transport.py + README ssh/channel.py ssh/transport.py 2005-02-06 23:32:22 GMT Robey Pointer patch-144 @@ -367,7 +367,7 @@ modified files: - README paramiko/pkey.py paramiko/sftp_attr.py + README ssh/pkey.py ssh/sftp_attr.py 2005-02-06 23:30:40 GMT Robey Pointer patch-143 @@ -411,9 +411,9 @@ modified files: - paramiko/auth_transport.py paramiko/channel.py - paramiko/sftp.py paramiko/sftp_client.py - paramiko/sftp_server.py paramiko/transport.py + ssh/auth_transport.py ssh/channel.py + ssh/sftp.py ssh/sftp_client.py + ssh/sftp_server.py ssh/transport.py 2005-01-17 10:09:09 GMT Robey Pointer patch-140 @@ -424,16 +424,16 @@ secsh--dev--1.0--patch-140 some tweaks to make channels etc follow the logger setting of their parent - transport, so that setting the log channel for a paramiko transport will + transport, so that setting the log channel for a ssh transport will cause all sub-logging to branch out from that channel. also, close all open file handles when the sftp server ends. modified files: - paramiko/channel.py paramiko/sftp_attr.py - paramiko/sftp_client.py paramiko/sftp_handle.py - paramiko/sftp_server.py paramiko/transport.py + ssh/channel.py ssh/sftp_attr.py + ssh/sftp_client.py ssh/sftp_handle.py + ssh/sftp_server.py ssh/transport.py 2005-01-16 21:03:15 GMT Robey Pointer patch-139 @@ -447,7 +447,7 @@ and make a -R option to force the tests to run against a remote server. the tests seem to work fine locally, and it helps test out server mode, even though there's a danger that they could get isolated from reality - and only test that paramiko can talk to itself. + and only test that ssh can talk to itself. modified files: @@ -464,7 +464,7 @@ little doc fixups that i did obsessively on the train one morning. modified files: - paramiko/file.py + ssh/file.py 2005-01-09 05:27:07 GMT Robey Pointer patch-137 @@ -479,7 +479,7 @@ modified files: - paramiko/sftp_attr.py paramiko/sftp_client.py + ssh/sftp_attr.py ssh/sftp_client.py 2004-12-19 19:56:48 GMT Robey Pointer patch-136 @@ -509,7 +509,7 @@ modified files: - paramiko/sftp_si.py + ssh/sftp_si.py 2004-12-19 19:43:27 GMT Robey Pointer patch-134 @@ -526,7 +526,7 @@ modified files: - paramiko/sftp_handle.py paramiko/sftp_server.py + ssh/sftp_handle.py ssh/sftp_server.py 2004-12-13 07:32:14 GMT Robey Pointer patch-133 @@ -554,7 +554,7 @@ modified files: - paramiko/server.py + ssh/server.py 2004-12-13 07:29:38 GMT Robey Pointer patch-131 @@ -569,7 +569,7 @@ modified files: - paramiko/transport.py + ssh/transport.py 2004-12-13 07:27:39 GMT Robey Pointer patch-130 @@ -585,7 +585,7 @@ modified files: - paramiko/auth_transport.py paramiko/channel.py setup.py + ssh/auth_transport.py ssh/channel.py setup.py 2004-12-12 09:58:40 GMT Robey Pointer patch-129 @@ -600,7 +600,7 @@ modified files: - Makefile README paramiko/__init__.py paramiko/transport.py + Makefile README ssh/__init__.py ssh/transport.py setup.py @@ -629,7 +629,7 @@ modified files: - paramiko/sftp_client.py + ssh/sftp_client.py 2004-12-12 09:25:15 GMT Robey Pointer patch-126 @@ -647,7 +647,7 @@ modified files: - paramiko/channel.py paramiko/server.py + ssh/channel.py ssh/server.py 2004-12-12 09:16:03 GMT Robey Pointer patch-125 @@ -663,7 +663,7 @@ modified files: - paramiko/auth_transport.py paramiko/ssh_exception.py + ssh/auth_transport.py ssh/ssh_exception.py 2004-12-11 03:44:33 GMT Robey Pointer patch-124 @@ -677,7 +677,7 @@ modified files: - paramiko/channel.py paramiko/sftp_server.py + ssh/channel.py ssh/sftp_server.py 2004-12-11 03:43:18 GMT Robey Pointer patch-123 @@ -701,8 +701,8 @@ modified files: - paramiko/__init__.py paramiko/auth_transport.py - paramiko/ssh_exception.py paramiko/transport.py + ssh/__init__.py ssh/auth_transport.py + ssh/ssh_exception.py ssh/transport.py tests/test_transport.py @@ -719,7 +719,7 @@ modified files: - paramiko/sftp_server.py paramiko/sftp_si.py tests/test_sftp.py + ssh/sftp_server.py ssh/sftp_si.py tests/test_sftp.py 2004-12-10 08:27:43 GMT Robey Pointer patch-121 @@ -732,7 +732,7 @@ oops, forgot this part. modified files: - paramiko/transport.py + ssh/transport.py 2004-12-10 08:25:28 GMT Robey Pointer patch-120 @@ -743,7 +743,7 @@ secsh--dev--1.0--patch-120 big embarrassment: i didn't read the ssh2 docs close enough, and all this - time paramiko wasn't handling "extended_data" packets, which contain stderr + time ssh wasn't handling "extended_data" packets, which contain stderr output. so now, several new functions: recv_stderr_ready() and recv_stderr() to @@ -753,7 +753,7 @@ modified files: - paramiko/channel.py + ssh/channel.py 2004-12-10 07:55:33 GMT Robey Pointer patch-119 @@ -783,7 +783,7 @@ modified files: - paramiko/sftp_file.py + ssh/sftp_file.py 2004-12-09 02:42:36 GMT Robey Pointer patch-117 @@ -810,7 +810,7 @@ modified files: - README paramiko/channel.py paramiko/common.py + README ssh/channel.py ssh/common.py 2004-11-25 19:39:34 GMT Robey Pointer patch-115 @@ -823,7 +823,7 @@ oops, fix typo in channel request failed. modified files: - paramiko/transport.py + ssh/transport.py 2004-11-22 07:40:39 GMT Robey Pointer patch-114 @@ -837,7 +837,7 @@ modified files: - paramiko/channel.py + ssh/channel.py 2004-11-22 07:27:21 GMT Robey Pointer patch-113 @@ -854,13 +854,13 @@ new files: - paramiko/.arch-ids/sftp_handle.py.id - paramiko/.arch-ids/sftp_server.py.id - paramiko/.arch-ids/sftp_si.py.id paramiko/sftp_handle.py - paramiko/sftp_server.py paramiko/sftp_si.py + ssh/.arch-ids/sftp_handle.py.id + ssh/.arch-ids/sftp_server.py.id + ssh/.arch-ids/sftp_si.py.id ssh/sftp_handle.py + ssh/sftp_server.py ssh/sftp_si.py modified files: - README demo_windows.py paramiko/__init__.py + README demo_windows.py ssh/__init__.py 2004-11-22 07:07:08 GMT Robey Pointer patch-112 @@ -876,7 +876,7 @@ modified files: - paramiko/server.py + ssh/server.py 2004-11-22 07:04:31 GMT Robey Pointer patch-111 @@ -892,7 +892,7 @@ modified files: - paramiko/channel.py paramiko/primes.py paramiko/transport.py + ssh/channel.py ssh/primes.py ssh/transport.py 2004-11-22 07:01:43 GMT Robey Pointer patch-110 @@ -907,7 +907,7 @@ username was stored in a different field). this should fix it. modified files: - paramiko/auth_transport.py + ssh/auth_transport.py 2004-11-07 03:10:53 GMT Robey Pointer patch-109 @@ -920,7 +920,7 @@ bump all the version numbers up to 1.0 (jigglypuff). modified files: - Makefile README paramiko/__init__.py paramiko/transport.py + Makefile README ssh/__init__.py ssh/transport.py setup.py @@ -934,7 +934,7 @@ add filename to the attributes stored in an SFTPAttributes object. modified files: - paramiko/sftp_attr.py + ssh/sftp_attr.py 2004-11-07 02:31:48 GMT Robey Pointer patch-107 @@ -948,7 +948,7 @@ layout kex_group1 a little more sanely. modified files: - paramiko/kex_gex.py paramiko/kex_group1.py + ssh/kex_gex.py ssh/kex_group1.py 2004-11-07 02:29:54 GMT Robey Pointer patch-106 @@ -989,7 +989,7 @@ fix location of SFTPError. modified files: - paramiko/__init__.py paramiko/sftp_client.py + ssh/__init__.py ssh/sftp_client.py 2004-11-07 02:17:18 GMT Robey Pointer patch-103 @@ -1003,7 +1003,7 @@ a bit more sense when sober (SFTP_OK). modified files: - paramiko/__init__.py paramiko/sftp.py paramiko/sftp_client.py + ssh/__init__.py ssh/sftp.py ssh/sftp_client.py 2004-11-07 02:08:11 GMT Robey Pointer patch-102 @@ -1089,7 +1089,7 @@ modified files: - paramiko/channel.py + ssh/channel.py 2004-11-01 03:43:28 GMT Robey Pointer patch-97 @@ -1106,7 +1106,7 @@ modified files: - paramiko/common.py paramiko/server.py paramiko/transport.py + ssh/common.py ssh/server.py ssh/transport.py 2004-11-01 03:37:42 GMT Robey Pointer patch-96 @@ -1121,7 +1121,7 @@ modified files: - paramiko/auth_transport.py + ssh/auth_transport.py 2004-10-23 07:36:23 GMT Robey Pointer patch-95 @@ -1136,7 +1136,7 @@ modified files: - Makefile README paramiko/__init__.py + Makefile README ssh/__init__.py 2004-10-20 16:52:51 GMT Robey Pointer patch-94 @@ -1158,7 +1158,7 @@ tests/test_transport.py modified files: - Makefile README paramiko/__init__.py setup.py test.py + Makefile README ssh/__init__.py setup.py test.py 2004-10-18 04:54:27 GMT Robey Pointer patch-93 @@ -1178,7 +1178,7 @@ modified files: - demo.py demo_simple.py paramiko/pkey.py paramiko/transport.py + demo.py demo_simple.py ssh/pkey.py ssh/transport.py 2004-09-25 22:07:59 GMT Robey Pointer patch-92 @@ -1224,7 +1224,7 @@ changes from a week or 2 ago where sftp_attr & friends were split off. modified files: - paramiko/__init__.py + ssh/__init__.py 2004-09-25 21:47:19 GMT Robey Pointer patch-89 @@ -1238,7 +1238,7 @@ on the socket-like object passed to the constructor. modified files: - paramiko/transport.py + ssh/transport.py 2004-09-25 21:32:53 GMT Robey Pointer patch-88 @@ -1252,7 +1252,7 @@ start reading from the beginning again. this is useful for some tests. modified files: - paramiko/message.py tests/test_message.py + ssh/message.py tests/test_message.py 2004-09-25 21:28:23 GMT Robey Pointer patch-87 @@ -1268,7 +1268,7 @@ and whether it can sign things (contains the "private parts") respectively. modified files: - paramiko/dsskey.py paramiko/pkey.py paramiko/rsakey.py + ssh/dsskey.py ssh/pkey.py ssh/rsakey.py 2004-09-11 21:01:32 GMT Robey Pointer patch-86 @@ -1279,7 +1279,7 @@ secsh--dev--1.0--patch-86 spanking new unit tests for Message. i'm trying to fix the embarrassment - of having so little of paramiko testable. next up is Transport! + of having so little of ssh testable. next up is Transport! new files: tests/.arch-ids/test_message.py.id tests/test_message.py @@ -1295,12 +1295,12 @@ move SFTPFile and SFTPAttributes into their own files. new files: - paramiko/.arch-ids/sftp_attr.py.id - paramiko/.arch-ids/sftp_file.py.id paramiko/sftp_attr.py - paramiko/sftp_file.py + ssh/.arch-ids/sftp_attr.py.id + ssh/.arch-ids/sftp_file.py.id ssh/sftp_attr.py + ssh/sftp_file.py modified files: - paramiko/sftp.py paramiko/sftp_client.py + ssh/sftp.py ssh/sftp_client.py 2004-09-11 20:50:39 GMT Robey Pointer patch-84 @@ -1315,7 +1315,7 @@ (normalize) directly maps to REALPATH. modified files: - paramiko/sftp_client.py + ssh/sftp_client.py 2004-09-11 20:43:09 GMT Robey Pointer patch-83 @@ -1329,7 +1329,7 @@ to read. modified files: - paramiko/kex_gex.py paramiko/kex_group1.py + ssh/kex_gex.py ssh/kex_group1.py 2004-09-11 20:40:08 GMT Robey Pointer patch-82 @@ -1342,7 +1342,7 @@ fix "string" -> "str" in types when documenting BufferedFile. modified files: - paramiko/file.py + ssh/file.py 2004-09-11 20:37:59 GMT Robey Pointer patch-81 @@ -1368,11 +1368,11 @@ move SubsystemHandler into server.py where it makes more sense (it's part of the server interface). - also fix up paramiko's "version string" used in ssh2 negotiation to stop - saying "pyssh" and start saying "paramiko". :) + also fix up ssh's "version string" used in ssh2 negotiation to stop + saying "pyssh" and start saying "ssh". :) modified files: - paramiko/server.py paramiko/transport.py + ssh/server.py ssh/transport.py 2004-09-11 20:35:19 GMT Robey Pointer patch-79 @@ -1386,7 +1386,7 @@ will add them all in order (using type guessing). modified files: - paramiko/message.py + ssh/message.py 2004-09-09 01:36:45 GMT Robey Pointer patch-78 @@ -1400,7 +1400,7 @@ kevin c. dorff for the bug report. modified files: - paramiko/file.py + ssh/file.py 2004-09-07 06:56:49 GMT Robey Pointer patch-77 @@ -1413,7 +1413,7 @@ add documentation to constructor for SubsystemHandler. modified files: - paramiko/transport.py + ssh/transport.py 2004-09-07 06:54:31 GMT Robey Pointer patch-76 @@ -1428,7 +1428,7 @@ improved SFTPAttributes object API. new files: - paramiko/.arch-ids/sftp_client.py.id paramiko/sftp_client.py + ssh/.arch-ids/sftp_client.py.id ssh/sftp_client.py 2004-09-07 06:51:03 GMT Robey Pointer patch-75 @@ -1447,7 +1447,7 @@ for use in ls (used in an obscure way in sftp servers). modified files: - paramiko/sftp.py + ssh/sftp.py 2004-09-07 06:45:53 GMT Robey Pointer patch-74 @@ -1479,7 +1479,7 @@ renamed a bunch of sftp constants now that they're better hidden from epydoc. modified files: - README paramiko/__init__.py paramiko/sftp.py + README ssh/__init__.py ssh/sftp.py 2004-09-05 07:41:45 GMT Robey Pointer patch-72 @@ -1497,7 +1497,7 @@ (to be subclassed). modified files: - paramiko/server.py paramiko/transport.py + ssh/server.py ssh/transport.py 2004-09-05 07:37:40 GMT Robey Pointer patch-71 @@ -1512,7 +1512,7 @@ server mode instead of always claiming that the transport is un-auth'd. modified files: - paramiko/auth_transport.py + ssh/auth_transport.py 2004-09-03 22:39:20 GMT Robey Pointer patch-70 @@ -1522,8 +1522,8 @@ Revision: secsh--dev--1.0--patch-70 - - export AUTH_*, OPEN_FAILED_*, and the new OPEN_SUCCEEDED into the paramiko - namespace instead of making people dig into paramiko.Transport.AUTH_* etc. + - export AUTH_*, OPEN_FAILED_*, and the new OPEN_SUCCEEDED into the ssh + namespace instead of making people dig into ssh.Transport.AUTH_* etc. - move all of the check_* methods from Channel to ServerInterface so apps don't need to subclass Channel anymore just to run an ssh server - ServerInterface.check_channel_request() returns an error code now, not a @@ -1533,10 +1533,10 @@ - added Channel.get_id() modified files: - README demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/channel.py - paramiko/common.py paramiko/server.py paramiko/sftp.py - paramiko/transport.py + README demo_server.py ssh/__init__.py + ssh/auth_transport.py ssh/channel.py + ssh/common.py ssh/server.py ssh/sftp.py + ssh/transport.py 2004-08-31 02:44:56 GMT Robey Pointer patch-69 @@ -1552,7 +1552,7 @@ to validate the fields. modified files: - paramiko/transport.py + ssh/transport.py 2004-08-30 20:22:10 GMT Robey Pointer patch-68 @@ -1572,8 +1572,8 @@ True/False, and fixed up docs in a few other places. modified files: - paramiko/__init__.py paramiko/channel.py paramiko/server.py - paramiko/sftp.py paramiko/transport.py + ssh/__init__.py ssh/channel.py ssh/server.py + ssh/sftp.py ssh/transport.py 2004-08-28 04:21:12 GMT Robey Pointer patch-67 @@ -1589,7 +1589,7 @@ apparently when i reversed it, i lost it entirely. modified files: - paramiko/channel.py + ssh/channel.py 2004-08-27 00:57:40 GMT Robey Pointer patch-66 @@ -1602,7 +1602,7 @@ a bunch of changes that i'm too lazy to split out into individual patches: * all the server overrides from transport.py have been moved into a separate class ServerInterface, so server code doesn't have to subclass the whole - paramiko library + ssh library * updated demo_server to subclass ServerInterface * when re-keying during a session, block other messages until the new keys are activated (openssh doensn't like any other traffic during a rekey) @@ -1612,11 +1612,11 @@ new files: - paramiko/.arch-ids/server.py.id paramiko/server.py + ssh/.arch-ids/server.py.id ssh/server.py modified files: - README demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/transport.py + README demo_server.py ssh/__init__.py + ssh/auth_transport.py ssh/transport.py 2004-08-27 00:28:33 GMT Robey Pointer patch-65 @@ -1632,7 +1632,7 @@ modified files: - paramiko/sftp.py + ssh/sftp.py 2004-08-27 00:26:35 GMT Robey Pointer patch-64 @@ -1652,7 +1652,7 @@ modified files: - paramiko/channel.py {arch}/=tagging-method + ssh/channel.py {arch}/=tagging-method 2004-08-27 00:06:42 GMT Robey Pointer patch-63 @@ -1667,7 +1667,7 @@ socket or channel. fix _read_all to not catch timeout exceptions. modified files: - paramiko/channel.py + ssh/channel.py 2004-06-27 20:14:15 GMT Robey Pointer patch-62 @@ -1680,7 +1680,7 @@ up version to horsea. modified files: - Makefile README paramiko/__init__.py setup.py + Makefile README ssh/__init__.py setup.py {arch}/secsh/secsh--dev/secsh--dev--1.0/robey@lag.net--2003-public/patch-log/patch-1 @@ -1691,16 +1691,16 @@ Revision: secsh--dev--1.0--patch-61 - fix "Foobar" to be "Paramiko" in the one place i missed it in all the gpl + fix "Foobar" to be "'ssh'" in the one place i missed it in all the gpl headers. sigh. :) modified files: - paramiko/__init__.py paramiko/auth_transport.py - paramiko/ber.py paramiko/common.py paramiko/dsskey.py - paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/logging22.py paramiko/message.py paramiko/pkey.py - paramiko/primes.py paramiko/rsakey.py - paramiko/ssh_exception.py paramiko/util.py test.py + ssh/__init__.py ssh/auth_transport.py + ssh/ber.py ssh/common.py ssh/dsskey.py + ssh/kex_gex.py ssh/kex_group1.py + ssh/logging22.py ssh/message.py ssh/pkey.py + ssh/primes.py ssh/rsakey.py + ssh/ssh_exception.py ssh/util.py test.py 2004-06-10 18:08:50 GMT Robey Pointer patch-60 @@ -1723,7 +1723,7 @@ flushed on seek. modified files: - paramiko/sftp.py paramiko/transport.py + ssh/sftp.py ssh/transport.py 2004-06-10 18:02:13 GMT Robey Pointer patch-59 @@ -1745,7 +1745,7 @@ buffer size is. there's no reason to buffer 1MB waiting for a linefeed. modified files: - paramiko/file.py + ssh/file.py 2004-06-10 17:55:17 GMT Robey Pointer patch-58 @@ -1768,7 +1768,7 @@ modified files: - paramiko/channel.py + ssh/channel.py 2004-06-10 17:35:30 GMT Robey Pointer patch-57 @@ -1801,7 +1801,7 @@ .arch-ids/forward.py.id forward.py modified files: - MANIFEST.in Makefile README paramiko/__init__.py setup.py + MANIFEST.in Makefile README ssh/__init__.py setup.py 2004-05-29 18:58:11 GMT Robey Pointer patch-55 @@ -1838,7 +1838,7 @@ be an EOF error. modified files: - paramiko/transport.py + ssh/transport.py 2004-05-29 18:48:23 GMT Robey Pointer patch-53 @@ -1869,7 +1869,7 @@ notice that you must be holding the lock before calling. modified files: - paramiko/channel.py + ssh/channel.py 2004-05-17 00:43:43 GMT Robey Pointer patch-51 @@ -1885,8 +1885,8 @@ level. and don't reject older sftp servers. modified files: - paramiko/auth_transport.py paramiko/sftp.py - paramiko/transport.py + ssh/auth_transport.py ssh/sftp.py + ssh/transport.py 2004-04-23 22:55:16 GMT Robey Pointer patch-50 @@ -1901,8 +1901,8 @@ try roger's trick for finding the home folder on windows. modified files: - Makefile README paramiko/__init__.py paramiko/channel.py - paramiko/common.py + Makefile README ssh/__init__.py ssh/channel.py + ssh/common.py 2004-04-08 06:31:08 GMT Robey Pointer patch-49 @@ -1914,7 +1914,7 @@ modified files: - paramiko/dsskey.py paramiko/rsakey.py paramiko/transport.py + ssh/dsskey.py ssh/rsakey.py ssh/transport.py 2004-04-08 05:48:16 GMT Robey Pointer patch-48 @@ -1927,7 +1927,7 @@ set version number to fearow. modified files: - Makefile README paramiko/__init__.py setup.py + Makefile README ssh/__init__.py setup.py 2004-04-08 05:12:20 GMT Robey Pointer patch-47 @@ -1941,7 +1941,7 @@ code patch that included this snip. modified files: - paramiko/common.py + ssh/common.py 2004-04-07 16:05:48 GMT Robey Pointer patch-46 @@ -1955,8 +1955,8 @@ fearow" to all the relevant API calls that are new. modified files: - README paramiko/auth_transport.py paramiko/dsskey.py - paramiko/pkey.py paramiko/rsakey.py paramiko/transport.py + README ssh/auth_transport.py ssh/dsskey.py + ssh/pkey.py ssh/rsakey.py ssh/transport.py 2004-04-07 15:52:07 GMT Robey Pointer patch-45 @@ -1971,7 +1971,7 @@ keepalive packet.) modified files: - paramiko/transport.py + ssh/transport.py 2004-04-07 06:07:29 GMT Robey Pointer patch-44 @@ -1991,8 +1991,8 @@ * tell channels to close when the transport dies modified files: - paramiko/auth_transport.py paramiko/channel.py - paramiko/common.py paramiko/pkey.py paramiko/transport.py + ssh/auth_transport.py ssh/channel.py + ssh/common.py ssh/pkey.py ssh/transport.py 2004-04-06 22:03:21 GMT Robey Pointer patch-43 @@ -2009,7 +2009,7 @@ mode normally.) modified files: - paramiko/pkey.py + ssh/pkey.py 2004-04-06 08:16:02 GMT Robey Pointer patch-42 @@ -2030,14 +2030,14 @@ also fixed the sftp unit tests to cope with a password-protected private key. new files: - paramiko/.arch-ids/logging22.py.id paramiko/logging22.py + ssh/.arch-ids/logging22.py.id ssh/logging22.py modified files: README demo.py demo_server.py demo_simple.py - paramiko/__init__.py paramiko/auth_transport.py - paramiko/channel.py paramiko/common.py paramiko/kex_gex.py - paramiko/kex_group1.py paramiko/message.py paramiko/sftp.py - paramiko/transport.py paramiko/util.py tests/test_sftp.py + ssh/__init__.py ssh/auth_transport.py + ssh/channel.py ssh/common.py ssh/kex_gex.py + ssh/kex_group1.py ssh/message.py ssh/sftp.py + ssh/transport.py ssh/util.py tests/test_sftp.py 2004-04-05 22:32:03 GMT Robey Pointer patch-41 @@ -2052,7 +2052,7 @@ from the pkey object, as well as other potentially useful things. modified files: - demo.py paramiko/transport.py + demo.py ssh/transport.py 2004-04-05 19:36:40 GMT Robey Pointer patch-40 @@ -2076,8 +2076,8 @@ call that one. modified files: - demo.py demo_simple.py paramiko/ber.py paramiko/dsskey.py - paramiko/pkey.py paramiko/rsakey.py paramiko/util.py + demo.py demo_simple.py ssh/ber.py ssh/dsskey.py + ssh/pkey.py ssh/rsakey.py ssh/util.py 2004-04-05 10:37:18 GMT Robey Pointer patch-39 @@ -2094,7 +2094,7 @@ ignore them, which was wrong.) modified files: - paramiko/common.py paramiko/message.py paramiko/transport.py + ssh/common.py ssh/message.py ssh/transport.py 2004-04-05 10:24:33 GMT Robey Pointer patch-38 @@ -2109,7 +2109,7 @@ new files: - paramiko/.arch-ids/common.py.id paramiko/common.py + ssh/.arch-ids/common.py.id ssh/common.py 2004-04-05 10:16:31 GMT Robey Pointer patch-37 @@ -2129,7 +2129,7 @@ modified files: - paramiko/ber.py paramiko/pkey.py paramiko/rsakey.py + ssh/ber.py ssh/pkey.py ssh/rsakey.py 2004-04-05 10:12:59 GMT Robey Pointer patch-36 @@ -2143,9 +2143,9 @@ lots of renaming because of this. modified files: - paramiko/auth_transport.py paramiko/channel.py - paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/transport.py paramiko/util.py + ssh/auth_transport.py ssh/channel.py + ssh/kex_gex.py ssh/kex_group1.py + ssh/transport.py ssh/util.py 2004-04-02 02:41:43 GMT Robey Pointer patch-35 @@ -2159,7 +2159,7 @@ remote side. modified files: - paramiko/transport.py + ssh/transport.py 2004-03-16 07:33:09 GMT Robey Pointer patch-34 @@ -2175,7 +2175,7 @@ (mostly this is a test to make sure tla is working okay on my laptop.) modified files: - paramiko/dsskey.py paramiko/rsakey.py + ssh/dsskey.py ssh/rsakey.py 2004-03-09 01:09:17 GMT Robey Pointer patch-33 @@ -2227,7 +2227,7 @@ tests. modified files: - Makefile README paramiko/__init__.py setup.py + Makefile README ssh/__init__.py setup.py 2004-03-08 17:50:49 GMT Robey Pointer patch-30 @@ -2243,7 +2243,7 @@ turned off ultra debugging now that the unit tests are all working. modified files: - paramiko/sftp.py + ssh/sftp.py 2004-03-08 17:45:44 GMT Robey Pointer patch-29 @@ -2259,7 +2259,7 @@ support that i somehow missed before.) modified files: - paramiko/file.py paramiko/message.py + ssh/file.py ssh/message.py 2004-03-08 09:47:47 GMT Robey Pointer patch-28 @@ -2283,7 +2283,7 @@ kill -9 python! yeah!! modified files: - paramiko/transport.py + ssh/transport.py 2004-03-04 08:21:45 GMT Robey Pointer patch-27 @@ -2307,12 +2307,12 @@ new files: .arch-ids/demo_sftp.py.id demo_sftp.py - paramiko/.arch-ids/file.py.id paramiko/.arch-ids/sftp.py.id - paramiko/file.py paramiko/sftp.py + ssh/.arch-ids/file.py.id ssh/.arch-ids/sftp.py.id + ssh/file.py ssh/sftp.py modified files: - paramiko/__init__.py paramiko/channel.py paramiko/message.py - paramiko/util.py + ssh/__init__.py ssh/channel.py ssh/message.py + ssh/util.py 2004-01-27 02:04:59 GMT Robey Pointer patch-26 @@ -2336,7 +2336,7 @@ the right thing. modified files: - paramiko/transport.py + ssh/transport.py 2004-01-27 02:00:19 GMT Robey Pointer patch-25 @@ -2352,7 +2352,7 @@ a corrupt key file. modified files: - paramiko/pkey.py + ssh/pkey.py 2004-01-27 01:45:44 GMT Robey Pointer patch-24 @@ -2366,7 +2366,7 @@ get_int64 added for eventual sftp support. modified files: - paramiko/message.py + ssh/message.py 2004-01-04 10:33:05 GMT Robey Pointer patch-23 @@ -2379,7 +2379,7 @@ fix broken cross-link in kex_gex docs. modified files: - paramiko/kex_gex.py + ssh/kex_gex.py 2004-01-04 10:26:00 GMT Robey Pointer patch-22 @@ -2396,12 +2396,12 @@ python file. modified files: - MANIFEST.in Makefile NOTES README paramiko/__init__.py - paramiko/auth_transport.py paramiko/ber.py paramiko/channel.py - paramiko/dsskey.py paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/message.py paramiko/pkey.py paramiko/primes.py - paramiko/rsakey.py paramiko/ssh_exception.py - paramiko/transport.py paramiko/util.py setup.py + MANIFEST.in Makefile NOTES README ssh/__init__.py + ssh/auth_transport.py ssh/ber.py ssh/channel.py + ssh/dsskey.py ssh/kex_gex.py ssh/kex_group1.py + ssh/message.py ssh/pkey.py ssh/primes.py + ssh/rsakey.py ssh/ssh_exception.py + ssh/transport.py ssh/util.py setup.py 2004-01-04 10:07:35 GMT Robey Pointer patch-21 @@ -2447,11 +2447,11 @@ and try again. modified files: - README demo.py demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/ber.py paramiko/channel.py - paramiko/dsskey.py paramiko/pkey.py paramiko/primes.py - paramiko/rsakey.py paramiko/ssh_exception.py - paramiko/transport.py paramiko/util.py + README demo.py demo_server.py ssh/__init__.py + ssh/auth_transport.py ssh/ber.py ssh/channel.py + ssh/dsskey.py ssh/pkey.py ssh/primes.py + ssh/rsakey.py ssh/ssh_exception.py + ssh/transport.py ssh/util.py 2003-12-31 06:31:43 GMT Robey Pointer patch-19 @@ -2465,8 +2465,8 @@ documentation. modified files: - README demo.py demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/transport.py + README demo.py demo_server.py ssh/__init__.py + ssh/auth_transport.py ssh/transport.py 2003-12-30 22:24:21 GMT Robey Pointer patch-18 @@ -2490,10 +2490,10 @@ user_rsa_key user_rsa_key.pub modified files: - Makefile demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/dsskey.py - paramiko/kex_gex.py paramiko/kex_group1.py paramiko/pkey.py - paramiko/rsakey.py paramiko/transport.py + Makefile demo_server.py ssh/__init__.py + ssh/auth_transport.py ssh/dsskey.py + ssh/kex_gex.py ssh/kex_group1.py ssh/pkey.py + ssh/rsakey.py ssh/transport.py 2003-12-30 07:18:20 GMT Robey Pointer patch-17 @@ -2519,17 +2519,17 @@ new files: .arch-ids/ChangeLog.id .arch-ids/demo_simple.py.id ChangeLog - demo_simple.py paramiko/.arch-ids/pkey.py.id paramiko/pkey.py + demo_simple.py ssh/.arch-ids/pkey.py.id ssh/pkey.py removed files: - .arch-ids/paramiko.py.id paramiko.py + .arch-ids/ssh.py.id ssh.py modified files: Makefile NOTES README demo.py demo_server.py - paramiko/__init__.py paramiko/auth_transport.py - paramiko/channel.py paramiko/dsskey.py paramiko/kex_gex.py - paramiko/kex_group1.py paramiko/rsakey.py - paramiko/transport.py setup.py {arch}/=tagging-method + ssh/__init__.py ssh/auth_transport.py + ssh/channel.py ssh/dsskey.py ssh/kex_gex.py + ssh/kex_group1.py ssh/rsakey.py + ssh/transport.py setup.py {arch}/=tagging-method renamed files: .arch-ids/demo_host_key.id @@ -2557,94 +2557,94 @@ methods were made private finally. new files: - paramiko/.arch-ids/primes.py.id paramiko/primes.py + ssh/.arch-ids/primes.py.id ssh/primes.py modified files: - NOTES demo.py demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/channel.py - paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/transport.py paramiko/util.py + NOTES demo.py demo_server.py ssh/__init__.py + ssh/auth_transport.py ssh/channel.py + ssh/kex_gex.py ssh/kex_group1.py + ssh/transport.py ssh/util.py 2003-12-27 02:03:44 GMT Robey Pointer patch-15 Summary: - fix up new paramiko/ folder. + fix up new ssh/ folder. Revision: secsh--dev--1.0--patch-15 - moved SSHException to a new file (ssh_exception.py) and turned paramiko.py + moved SSHException to a new file (ssh_exception.py) and turned ssh.py into an __init__.py file. i'm still not entirely sure how this normally works, so i may have done something wrong, but it's supposed to work the same as before. new files: - paramiko/.arch-ids/__init__.py.id - paramiko/.arch-ids/ssh_exception.py.id paramiko/__init__.py - paramiko/ssh_exception.py + ssh/.arch-ids/__init__.py.id + ssh/.arch-ids/ssh_exception.py.id ssh/__init__.py + ssh/ssh_exception.py modified files: - paramiko/auth_transport.py paramiko/channel.py - paramiko/dsskey.py paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/transport.py + ssh/auth_transport.py ssh/channel.py + ssh/dsskey.py ssh/kex_gex.py ssh/kex_group1.py + ssh/transport.py 2003-12-27 01:49:19 GMT Robey Pointer patch-14 Summary: - move the paramiko files into a paramiko/ folder. + move the ssh files into a ssh/ folder. Revision: secsh--dev--1.0--patch-14 just moving the files into a folder. it won't build this way yet. new files: - paramiko/.arch-ids/=id + ssh/.arch-ids/=id renamed files: .arch-ids/auth_transport.py.id - ==> paramiko/.arch-ids/auth_transport.py.id + ==> ssh/.arch-ids/auth_transport.py.id .arch-ids/ber.py.id - ==> paramiko/.arch-ids/ber.py.id + ==> ssh/.arch-ids/ber.py.id .arch-ids/channel.py.id - ==> paramiko/.arch-ids/channel.py.id + ==> ssh/.arch-ids/channel.py.id .arch-ids/dsskey.py.id - ==> paramiko/.arch-ids/dsskey.py.id + ==> ssh/.arch-ids/dsskey.py.id .arch-ids/kex_gex.py.id - ==> paramiko/.arch-ids/kex_gex.py.id + ==> ssh/.arch-ids/kex_gex.py.id .arch-ids/kex_group1.py.id - ==> paramiko/.arch-ids/kex_group1.py.id + ==> ssh/.arch-ids/kex_group1.py.id .arch-ids/message.py.id - ==> paramiko/.arch-ids/message.py.id + ==> ssh/.arch-ids/message.py.id .arch-ids/rsakey.py.id - ==> paramiko/.arch-ids/rsakey.py.id + ==> ssh/.arch-ids/rsakey.py.id .arch-ids/transport.py.id - ==> paramiko/.arch-ids/transport.py.id + ==> ssh/.arch-ids/transport.py.id .arch-ids/util.py.id - ==> paramiko/.arch-ids/util.py.id + ==> ssh/.arch-ids/util.py.id auth_transport.py - ==> paramiko/auth_transport.py + ==> ssh/auth_transport.py ber.py - ==> paramiko/ber.py + ==> ssh/ber.py channel.py - ==> paramiko/channel.py + ==> ssh/channel.py dsskey.py - ==> paramiko/dsskey.py + ==> ssh/dsskey.py kex_gex.py - ==> paramiko/kex_gex.py + ==> ssh/kex_gex.py kex_group1.py - ==> paramiko/kex_group1.py + ==> ssh/kex_group1.py message.py - ==> paramiko/message.py + ==> ssh/message.py rsakey.py - ==> paramiko/rsakey.py + ==> ssh/rsakey.py transport.py - ==> paramiko/transport.py + ==> ssh/transport.py util.py - ==> paramiko/util.py + ==> ssh/util.py new directories: - paramiko paramiko/.arch-ids + ssh ssh/.arch-ids 2003-12-24 22:09:43 GMT Robey Pointer patch-13 @@ -2680,7 +2680,7 @@ .arch-ids/demo_dss_key.id demo_dss_key modified files: - demo_server.py dsskey.py kex_gex.py kex_group1.py paramiko.py + demo_server.py dsskey.py kex_gex.py kex_group1.py ssh.py rsakey.py transport.py @@ -2714,7 +2714,7 @@ 2003-11-10 08:49:50 GMT Robey Pointer patch-9 Summary: - rename secsh -> paramiko + rename secsh -> ssh Revision: secsh--dev--1.0--patch-9 @@ -2723,14 +2723,14 @@ modified files: ./MANIFEST ./Makefile ./NOTES ./README ./auth_transport.py ./channel.py ./demo.py ./demo_server.py ./kex_gex.py - ./kex_group1.py ./message.py ./paramiko.py ./setup.py + ./kex_group1.py ./message.py ./ssh.py ./setup.py ./transport.py renamed files: ./.arch-ids/secsh.py.id - ==> ./.arch-ids/paramiko.py.id + ==> ./.arch-ids/ssh.py.id ./secsh.py - ==> ./paramiko.py + ==> ./ssh.py 2003-11-10 06:52:35 GMT Robey Pointer patch-8 diff --git a/Makefile b/Makefile index 1815a8a..2bfda4a 100644 --- a/Makefile +++ b/Makefile @@ -46,21 +46,21 @@ release: docs python ./setup.py sdist --formats=gztar python ./setup.py bdist_egg zip -r dist/docs.zip docs && rm -rf docs - cd dist && $(MD5SUM) paramiko*.zip *.gz > md5-sums - cd dist && gpg -ba paramiko*.zip - cd dist && gpg -ba paramiko*.gz + cd dist && $(MD5SUM) ssh*.zip *.gz > md5-sums + cd dist && gpg -ba ssh*.zip + cd dist && gpg -ba ssh*.gz docs: always - epydoc --no-private -o docs/ paramiko + epydoc --no-private -o docs/ ssh always: clean: rm -rf build dist docs rm -f MANIFEST *.log demos/*.log - rm -f paramiko/*.pyc + rm -f ssh/*.pyc rm -f test.log - rm -rf paramiko.egg-info + rm -rf ssh.egg-info test: python ./test.py diff --git a/NEWS b/NEWS index 7bedcb5..59e356c 100644 --- a/NEWS +++ b/NEWS @@ -225,7 +225,7 @@ v1.3.1 (nidoran) 28jun05 * added Transport.open_sftp_client() for convenience * refactored packetizing out of Transport * fixed bug (reported by alain s.) where connecting to a non-SSH host could - cause paramiko to freeze up + cause ssh to freeze up * fixed Channel.fileno() for Windows (again) * some more unit tests @@ -321,7 +321,7 @@ v0.9 (fearow) 23apr04 * Transport.get_remove_server_key() now returns a PKey object instead of a tuple of strings * Transport.get_username() -- return the username you auth'd as [client] - * Transport.set_keepalive() -- makes paramiko send periodic junk packets + * Transport.set_keepalive() -- makes ssh send periodic junk packets to the remote host, to keep the session active * python 2.2 support (thanks to Roger Binns) * misc. bug fixes diff --git a/README b/README index f977c6d..3ff6d2b 100644 --- a/README +++ b/README @@ -1,15 +1,15 @@ ======== -paramiko +ssh ======== -:Paramiko: Python SSH module +:'ssh': Python SSH module :Copyright: Copyright (c) 2003-2009 Robey Pointer :License: LGPL :Homepage: http://www.lag.net/paramiko/ -paramiko 1.7.7.1 +ssh 1.7.7.1 ================ "George" release, 21 may 2011 @@ -18,8 +18,7 @@ paramiko 1.7.7.1 What ---- -"paramiko" is a combination of the esperanto words for "paranoid" and -"friend". it's a module for python 2.2+ that implements the SSH2 protocol +"ssh" is a module for python 2.2+ that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines. unlike SSL (aka TLS), SSH2 protocol does not require hierarchical certificates signed by a powerful central authority. you may know SSH2 as @@ -42,7 +41,7 @@ Requirements (python 2.2 is also supported, but not recommended) - pycrypto 2.1 or better -If you have setuptools, you can build and install paramiko and all its +If you have setuptools, you can build and install ssh and all its dependencies with this command (as root):: easy_install ./ @@ -62,7 +61,7 @@ watch out for: * sockets in 2.2 don't support timeouts, so the 'select' module is imported to do polling. - * logging is mostly stubbed out. it works just enough to let paramiko + * logging is mostly stubbed out. it works just enough to let ssh create log files for debugging, if you want them. to get real logging, you can backport python 2.3's logging package. Roger has done that already: @@ -99,12 +98,12 @@ there's also a low-traffic mailing list for support and discussions: Demo ---- -several demo scripts come with paramiko to demonstrate how to use it. +several demo scripts come with ssh to demonstrate how to use it. probably the simplest demo of all is this:: - import paramiko, base64 - key = paramiko.RSAKey(data=base64.decodestring('AAA...')) - client = paramiko.SSHClient() + import ssh, base64 + key = ssh.RSAKey(data=base64.decodestring('AAA...')) + client = ssh.SSHClient() client.get_host_keys().add('ssh.example.com', 'ssh-rsa', key) client.connect('ssh.example.com', username='strongbad', password='thecheat') stdin, stdout, stderr = client.exec_command('ls') diff --git a/demos/demo.py b/demos/demo.py index 05524d3..5ae7410 100755 --- a/demos/demo.py +++ b/demos/demo.py @@ -2,20 +2,20 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. @@ -30,7 +30,7 @@ import threading import time import traceback -import paramiko +import ssh import interactive @@ -40,7 +40,7 @@ def agent_auth(transport, username): keys available from an SSH agent. """ - agent = paramiko.Agent() + agent = ssh.Agent() agent_keys = agent.get_keys() if len(agent_keys) == 0: return @@ -51,7 +51,7 @@ def agent_auth(transport, username): transport.auth_publickey(username, key) print '... success!' return - except paramiko.SSHException: + except ssh.SSHException: print '... nope.' @@ -67,10 +67,10 @@ def manual_auth(username, hostname): if len(path) == 0: path = default_path try: - key = paramiko.RSAKey.from_private_key_file(path) - except paramiko.PasswordRequiredException: + key = ssh.RSAKey.from_private_key_file(path) + except ssh.PasswordRequiredException: password = getpass.getpass('RSA key password: ') - key = paramiko.RSAKey.from_private_key_file(path, password) + key = ssh.RSAKey.from_private_key_file(path, password) t.auth_publickey(username, key) elif auth == 'd': default_path = os.path.join(os.environ['HOME'], '.ssh', 'id_dsa') @@ -78,10 +78,10 @@ def manual_auth(username, hostname): if len(path) == 0: path = default_path try: - key = paramiko.DSSKey.from_private_key_file(path) - except paramiko.PasswordRequiredException: + key = ssh.DSSKey.from_private_key_file(path) + except ssh.PasswordRequiredException: password = getpass.getpass('DSS key password: ') - key = paramiko.DSSKey.from_private_key_file(path, password) + key = ssh.DSSKey.from_private_key_file(path, password) t.auth_publickey(username, key) else: pw = getpass.getpass('Password for %s@%s: ' % (username, hostname)) @@ -89,7 +89,7 @@ def manual_auth(username, hostname): # setup logging -paramiko.util.log_to_file('demo.log') +ssh.util.log_to_file('demo.log') username = '' if len(sys.argv) > 1: @@ -116,18 +116,18 @@ except Exception, e: sys.exit(1) try: - t = paramiko.Transport(sock) + t = ssh.Transport(sock) try: t.start_client() - except paramiko.SSHException: + except ssh.SSHException: print '*** SSH negotiation failed.' sys.exit(1) try: - keys = paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts')) + keys = ssh.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts')) except IOError: try: - keys = paramiko.util.load_host_keys(os.path.expanduser('~/ssh/known_hosts')) + keys = ssh.util.load_host_keys(os.path.expanduser('~/ssh/known_hosts')) except IOError: print '*** Unable to open host keys file' keys = {} diff --git a/demos/demo_server.py b/demos/demo_server.py index 4972928..3465310 100644 --- a/demos/demo_server.py +++ b/demos/demo_server.py @@ -2,20 +2,20 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. import base64 @@ -26,45 +26,45 @@ import sys import threading import traceback -import paramiko +import ssh # setup logging -paramiko.util.log_to_file('demo_server.log') +ssh.util.log_to_file('demo_server.log') -host_key = paramiko.RSAKey(filename='test_rsa.key') -#host_key = paramiko.DSSKey(filename='test_dss.key') +host_key = ssh.RSAKey(filename='test_rsa.key') +#host_key = ssh.DSSKey(filename='test_dss.key') print 'Read key: ' + hexlify(host_key.get_fingerprint()) -class Server (paramiko.ServerInterface): +class Server (ssh.ServerInterface): # 'data' is the output of base64.encodestring(str(key)) # (using the "user_rsa_key" files) data = 'AAAAB3NzaC1yc2EAAAABIwAAAIEAyO4it3fHlmGZWJaGrfeHOVY7RWO3P9M7hp' + \ 'fAu7jJ2d7eothvfeuoRFtJwhUmZDluRdFyhFY/hFAh76PJKGAusIqIQKlkJxMC' + \ 'KDqIexkgHAfID/6mqvmnSJf0b5W8v5h2pI/stOSwTQ+pxVhwJ9ctYDhRSlF0iT' + \ 'UWT10hcuO4Ks8=' - good_pub_key = paramiko.RSAKey(data=base64.decodestring(data)) + good_pub_key = ssh.RSAKey(data=base64.decodestring(data)) def __init__(self): self.event = threading.Event() def check_channel_request(self, kind, chanid): if kind == 'session': - return paramiko.OPEN_SUCCEEDED - return paramiko.OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED + return ssh.OPEN_SUCCEEDED + return ssh.OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED def check_auth_password(self, username, password): if (username == 'robey') and (password == 'foo'): - return paramiko.AUTH_SUCCESSFUL - return paramiko.AUTH_FAILED + return ssh.AUTH_SUCCESSFUL + return ssh.AUTH_FAILED def check_auth_publickey(self, username, key): print 'Auth attempt with key: ' + hexlify(key.get_fingerprint()) if (username == 'robey') and (key == self.good_pub_key): - return paramiko.AUTH_SUCCESSFUL - return paramiko.AUTH_FAILED + return ssh.AUTH_SUCCESSFUL + return ssh.AUTH_FAILED def get_allowed_auths(self, username): return 'password,publickey' @@ -100,7 +100,7 @@ except Exception, e: print 'Got a connection!' try: - t = paramiko.Transport(client) + t = ssh.Transport(client) try: t.load_server_moduli() except: @@ -110,7 +110,7 @@ try: server = Server() try: t.start_server(server=server) - except paramiko.SSHException, x: + except ssh.SSHException, x: print '*** SSH negotiation failed.' sys.exit(1) diff --git a/demos/demo_sftp.py b/demos/demo_sftp.py index 992615f..270c0d1 100755 --- a/demos/demo_sftp.py +++ b/demos/demo_sftp.py @@ -2,20 +2,20 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. # based on code provided by raymond mosteller (thanks!) @@ -27,11 +27,11 @@ import socket import sys import traceback -import paramiko +import ssh # setup logging -paramiko.util.log_to_file('demo_sftp.log') +ssh.util.log_to_file('demo_sftp.log') # get hostname username = '' @@ -63,11 +63,11 @@ password = getpass.getpass('Password for %s@%s: ' % (username, hostname)) hostkeytype = None hostkey = None try: - host_keys = paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts')) + host_keys = ssh.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts')) except IOError: try: # try ~/ssh/ too, because windows can't have a folder named ~/.ssh/ - host_keys = paramiko.util.load_host_keys(os.path.expanduser('~/ssh/known_hosts')) + host_keys = ssh.util.load_host_keys(os.path.expanduser('~/ssh/known_hosts')) except IOError: print '*** Unable to open host keys file' host_keys = {} @@ -78,11 +78,11 @@ if host_keys.has_key(hostname): print 'Using host key of type %s' % hostkeytype -# now, connect and use paramiko Transport to negotiate SSH2 across the connection +# now, connect and use ssh Transport to negotiate SSH2 across the connection try: - t = paramiko.Transport((hostname, port)) + t = ssh.Transport((hostname, port)) t.connect(username=username, password=password, hostkey=hostkey) - sftp = paramiko.SFTPClient.from_transport(t) + sftp = ssh.SFTPClient.from_transport(t) # dirlist on remote host dirlist = sftp.listdir('.') diff --git a/demos/demo_simple.py b/demos/demo_simple.py index 231da8d..c46a9e4 100755 --- a/demos/demo_simple.py +++ b/demos/demo_simple.py @@ -2,20 +2,20 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. @@ -26,12 +26,12 @@ import socket import sys import traceback -import paramiko +import ssh import interactive # setup logging -paramiko.util.log_to_file('demo_simple.log') +ssh.util.log_to_file('demo_simple.log') # get hostname username = '' @@ -59,11 +59,11 @@ if username == '': password = getpass.getpass('Password for %s@%s: ' % (username, hostname)) -# now, connect and use paramiko Client to negotiate SSH2 across the connection +# now, connect and use ssh Client to negotiate SSH2 across the connection try: - client = paramiko.SSHClient() + client = ssh.SSHClient() client.load_system_host_keys() - client.set_missing_host_key_policy(paramiko.WarningPolicy) + client.set_missing_host_key_policy(ssh.WarningPolicy) print '*** Connecting...' client.connect(hostname, port, username, password) chan = client.invoke_shell() diff --git a/demos/forward.py b/demos/forward.py index 4e10785..249ee53 100644 --- a/demos/forward.py +++ b/demos/forward.py @@ -2,24 +2,24 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -Sample script showing how to do local port forwarding over paramiko. +Sample script showing how to do local port forwarding over ssh. This script connects to the requested SSH server and sets up local port forwarding (the openssh -L option) from a local port through a tunneled @@ -34,7 +34,7 @@ import SocketServer import sys from optparse import OptionParser -import paramiko +import ssh SSH_PORT = 22 DEFAULT_PORT = 4000 @@ -100,7 +100,7 @@ def verbose(s): HELP = """\ -Set up a forward tunnel across an SSH server, using paramiko. A local port +Set up a forward tunnel across an SSH server, using ssh. A local port (given with -p) is forwarded across an SSH session to an address:port from the SSH server. This is similar to the openssh -L option. """ @@ -155,9 +155,9 @@ def main(): if options.readpass: password = getpass.getpass('Enter SSH password: ') - client = paramiko.SSHClient() + client = ssh.SSHClient() client.load_system_host_keys() - client.set_missing_host_key_policy(paramiko.WarningPolicy()) + client.set_missing_host_key_policy(ssh.WarningPolicy()) verbose('Connecting to ssh host %s:%d ...' % (server[0], server[1])) try: diff --git a/demos/interactive.py b/demos/interactive.py index 4cbc617..2aa4f7e 100644 --- a/demos/interactive.py +++ b/demos/interactive.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. diff --git a/demos/rforward.py b/demos/rforward.py index ef4c532..c9f4616 100755 --- a/demos/rforward.py +++ b/demos/rforward.py @@ -2,24 +2,24 @@ # Copyright (C) 2008 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -Sample script showing how to do remote port forwarding over paramiko. +Sample script showing how to do remote port forwarding over ssh. This script connects to the requested SSH server and sets up remote port forwarding (the openssh -R option) from a remote port through a tunneled @@ -34,7 +34,7 @@ import sys import threading from optparse import OptionParser -import paramiko +import ssh SSH_PORT = 22 DEFAULT_PORT = 4000 @@ -86,7 +86,7 @@ def verbose(s): HELP = """\ -Set up a reverse forwarding tunnel across an SSH server, using paramiko. A +Set up a reverse forwarding tunnel across an SSH server, using ssh. A port on the SSH server (given with -p) is forwarded across an SSH session back to the local machine, and out to a remote site reachable from this network. This is similar to the openssh -R option. @@ -142,9 +142,9 @@ def main(): if options.readpass: password = getpass.getpass('Enter SSH password: ') - client = paramiko.SSHClient() + client = ssh.SSHClient() client.load_system_host_keys() - client.set_missing_host_key_policy(paramiko.WarningPolicy()) + client.set_missing_host_key_policy(ssh.WarningPolicy()) verbose('Connecting to ssh host %s:%d ...' % (server[0], server[1])) try: diff --git a/images/paramiko-banner.psd b/images/paramiko-banner.psd index 20ebbc868968c28ac8a1f2155b7572a693917589..94e34f7552becd60523880a3ef3b90cda508fb95 100644 GIT binary patch delta 20 ccmcaOo%!r^<_&j!n2U=uHb3=wQ^&{!0BBVSRsaA1 delta 23 fcmX>*o%!N)<_&j!I0_Pr5_2=N^EW^6c~b`fgQp8o diff --git a/setup.py b/setup.py index 4537a8a..33bb82d 100644 --- a/setup.py +++ b/setup.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2008 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. @@ -47,13 +47,13 @@ if sys.platform == 'darwin': setup_helper.install_custom_make_tarball() -setup(name = "paramiko", +setup(name = "ssh", version = "1.7.7.1", description = "SSH2 protocol library", author = "Robey Pointer", author_email = "robeypointer@gmail.com", - url = "http://www.lag.net/paramiko/", - packages = [ 'paramiko' ], + url = "http://www.lag.net/ssh/", + packages = [ 'ssh' ], license = 'LGPL', platforms = 'Posix; MacOS X; Windows', classifiers = [ 'Development Status :: 5 - Production/Stable', diff --git a/setup_helper.py b/setup_helper.py index e8f3f2f..9c0cffb 100644 --- a/setup_helper.py +++ b/setup_helper.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. # Note: Despite the copyright notice, this was submitted by John diff --git a/paramiko/__init__.py b/ssh/__init__.py similarity index 91% rename from paramiko/__init__.py rename to ssh/__init__.py index 96b5943..d8d513f 100644 --- a/paramiko/__init__.py +++ b/ssh/__init__.py @@ -1,23 +1,23 @@ # Copyright (C) 2003-2011 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -I{Paramiko} (a combination of the esperanto words for "paranoid" and "friend") +I{'ssh'} (a combination of the esperanto words for "paranoid" and "friend") is a module for python 2.3 or greater that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines. Unlike SSL (aka TLS), the SSH2 protocol does not require hierarchical certificates @@ -32,7 +32,7 @@ L{Transport}, and use L{start_server } or L{start_client } to negoatite with the remote host as either a server or client. As a client, you are responsible for authenticating using a password or private key, and checking -the server's host key. I{(Key signature and verification is done by paramiko, +the server's host key. I{(Key signature and verification is done by ssh, but you will need to provide private keys and check that the content of a public key matches what you expected to see.)} As a server, you are responsible for deciding which users, passwords, and keys to allow, and what @@ -42,10 +42,10 @@ Once you have finished, either side may request flow-controlled L{Channel}s to the other side, which are python objects that act like sockets, but send and receive data over the encrypted session. -Paramiko is written entirely in python (no C or platform-dependent code) and is +'ssh' is written entirely in python (no C or platform-dependent code) and is released under the GNU Lesser General Public License (LGPL). -Website: U{http://www.lag.net/paramiko/} +Website: U{http://www.lag.net/ssh/} @version: 1.7.7.1 (George) @author: Robey Pointer diff --git a/paramiko/agent.py b/ssh/agent.py similarity index 92% rename from paramiko/agent.py rename to ssh/agent.py index 3bb9426..95b1034 100644 --- a/paramiko/agent.py +++ b/ssh/agent.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 John Rochester # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -25,9 +25,9 @@ import socket import struct import sys -from paramiko.ssh_exception import SSHException -from paramiko.message import Message -from paramiko.pkey import PKey +from ssh.ssh_exception import SSHException +from ssh.message import Message +from ssh.pkey import PKey SSH2_AGENTC_REQUEST_IDENTITIES, SSH2_AGENT_IDENTITIES_ANSWER, \ diff --git a/paramiko/auth_handler.py b/ssh/auth_handler.py similarity index 97% rename from paramiko/auth_handler.py rename to ssh/auth_handler.py index e3bd82d..368fa71 100644 --- a/paramiko/auth_handler.py +++ b/ssh/auth_handler.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -26,12 +26,12 @@ import weakref # this helps freezing utils import encodings.utf_8 -from paramiko.common import * -from paramiko import util -from paramiko.message import Message -from paramiko.ssh_exception import SSHException, AuthenticationException, \ +from ssh.common import * +from ssh import util +from ssh.message import Message +from ssh.ssh_exception import SSHException, AuthenticationException, \ BadAuthenticationType, PartialAuthentication -from paramiko.server import InteractiveQuery +from ssh.server import InteractiveQuery class AuthHandler (object): diff --git a/paramiko/ber.py b/ssh/ber.py similarity index 93% rename from paramiko/ber.py rename to ssh/ber.py index 19568dd..ddc8070 100644 --- a/paramiko/ber.py +++ b/ssh/ber.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. diff --git a/paramiko/buffered_pipe.py b/ssh/buffered_pipe.py similarity index 95% rename from paramiko/buffered_pipe.py rename to ssh/buffered_pipe.py index b19d74b..2d2b3e7 100644 --- a/paramiko/buffered_pipe.py +++ b/ssh/buffered_pipe.py @@ -1,19 +1,19 @@ # Copyright (C) 2006-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/paramiko/channel.py b/ssh/channel.py similarity index 98% rename from paramiko/channel.py rename to ssh/channel.py index 6d895fe..5162b36 100644 --- a/paramiko/channel.py +++ b/ssh/channel.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -27,13 +27,13 @@ import threading import socket import os -from paramiko.common import * -from paramiko import util -from paramiko.message import Message -from paramiko.ssh_exception import SSHException -from paramiko.file import BufferedFile -from paramiko.buffered_pipe import BufferedPipe, PipeTimeout -from paramiko import pipe +from ssh.common import * +from ssh import util +from ssh.message import Message +from ssh.ssh_exception import SSHException +from ssh.file import BufferedFile +from ssh.buffered_pipe import BufferedPipe, PipeTimeout +from ssh import pipe # lower bound on the max packet size we'll accept from the remote host @@ -87,7 +87,7 @@ class Channel (object): self.in_window_sofar = 0 self.status_event = threading.Event() self._name = str(chanid) - self.logger = util.get_logger('paramiko.transport') + self.logger = util.get_logger('ssh.transport') self._pipe = None self.event = threading.Event() self.event_ready = False @@ -107,7 +107,7 @@ class Channel (object): @rtype: str """ - out = '' + return '' def _read(self, size): return self.channel.recv(size) diff --git a/paramiko/client.py b/ssh/client.py similarity index 96% rename from paramiko/client.py rename to ssh/client.py index 4a65477..d5209fa 100644 --- a/paramiko/client.py +++ b/ssh/client.py @@ -1,19 +1,19 @@ # Copyright (C) 2006-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -26,14 +26,14 @@ import os import socket import warnings -from paramiko.agent import Agent -from paramiko.common import * -from paramiko.dsskey import DSSKey -from paramiko.hostkeys import HostKeys -from paramiko.resource import ResourceManager -from paramiko.rsakey import RSAKey -from paramiko.ssh_exception import SSHException, BadHostKeyException -from paramiko.transport import Transport +from ssh.agent import Agent +from ssh.common import * +from ssh.dsskey import DSSKey +from ssh.hostkeys import HostKeys +from ssh.resource import ResourceManager +from ssh.rsakey import RSAKey +from ssh.ssh_exception import SSHException, BadHostKeyException +from ssh.transport import Transport SSH_PORT = 22 @@ -187,7 +187,7 @@ class SSHClient (object): @raise IOError: if the file could not be written """ f = open(filename, 'w') - f.write('# SSH host keys collected by paramiko\n') + f.write('# SSH host keys collected by ssh\n') for hostname, keys in self._host_keys.iteritems(): for keytype, key in keys.iteritems(): f.write('%s %s %s\n' % (hostname, keytype, key.get_base64())) @@ -205,7 +205,7 @@ class SSHClient (object): def set_log_channel(self, name): """ - Set the channel for logging. The default is C{"paramiko.transport"} + Set the channel for logging. The default is C{"ssh.transport"} but it can be set to anything you want. @param name: new channel name for logging diff --git a/paramiko/common.py b/ssh/common.py similarity index 93% rename from paramiko/common.py rename to ssh/common.py index 3323f0a..168161d 100644 --- a/paramiko/common.py +++ b/ssh/common.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/paramiko/compress.py b/ssh/compress.py similarity index 78% rename from paramiko/compress.py rename to ssh/compress.py index 40b430f..ca7d9ed 100644 --- a/paramiko/compress.py +++ b/ssh/compress.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/paramiko/config.py b/ssh/config.py similarity index 93% rename from paramiko/config.py rename to ssh/config.py index 2a2cbff..57e6bad 100644 --- a/paramiko/config.py +++ b/ssh/config.py @@ -1,19 +1,19 @@ # Copyright (C) 2006-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/paramiko/dsskey.py b/ssh/dsskey.py similarity index 92% rename from paramiko/dsskey.py rename to ssh/dsskey.py index 53ca92b..765a73c 100644 --- a/paramiko/dsskey.py +++ b/ssh/dsskey.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -23,12 +23,12 @@ L{DSSKey} from Crypto.PublicKey import DSA from Crypto.Hash import SHA -from paramiko.common import * -from paramiko import util -from paramiko.ssh_exception import SSHException -from paramiko.message import Message -from paramiko.ber import BER, BERException -from paramiko.pkey import PKey +from ssh.common import * +from ssh import util +from ssh.ssh_exception import SSHException +from ssh.message import Message +from ssh.ber import BER, BERException +from ssh.pkey import PKey class DSSKey (PKey): diff --git a/paramiko/file.py b/ssh/file.py similarity index 98% rename from paramiko/file.py rename to ssh/file.py index d4aec8e..2a813c8 100644 --- a/paramiko/file.py +++ b/ssh/file.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/paramiko/hostkeys.py b/ssh/hostkeys.py similarity index 96% rename from paramiko/hostkeys.py rename to ssh/hostkeys.py index 70ccf43..5e59661 100644 --- a/paramiko/hostkeys.py +++ b/ssh/hostkeys.py @@ -1,19 +1,19 @@ # Copyright (C) 2006-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -24,9 +24,9 @@ import base64 from Crypto.Hash import SHA, HMAC import UserDict -from paramiko.common import * -from paramiko.dsskey import DSSKey -from paramiko.rsakey import RSAKey +from ssh.common import * +from ssh.dsskey import DSSKey +from ssh.rsakey import RSAKey class HostKeyEntry: diff --git a/paramiko/kex_gex.py b/ssh/kex_gex.py similarity index 94% rename from paramiko/kex_gex.py rename to ssh/kex_gex.py index 9c98339..78d2fab 100644 --- a/paramiko/kex_gex.py +++ b/ssh/kex_gex.py @@ -1,23 +1,23 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -Variant on L{KexGroup1 } where the prime "p" and +Variant on L{KexGroup1 } where the prime "p" and generator "g" are provided by the server. A bit more work is required on the client side, and a B{lot} more on the server side. """ @@ -25,10 +25,10 @@ client side, and a B{lot} more on the server side. from Crypto.Hash import SHA from Crypto.Util import number -from paramiko.common import * -from paramiko import util -from paramiko.message import Message -from paramiko.ssh_exception import SSHException +from ssh.common import * +from ssh import util +from ssh.message import Message +from ssh.ssh_exception import SSHException _MSG_KEXDH_GEX_REQUEST_OLD, _MSG_KEXDH_GEX_GROUP, _MSG_KEXDH_GEX_INIT, \ diff --git a/paramiko/kex_group1.py b/ssh/kex_group1.py similarity index 92% rename from paramiko/kex_group1.py rename to ssh/kex_group1.py index 1386cf3..9e68023 100644 --- a/paramiko/kex_group1.py +++ b/ssh/kex_group1.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -23,10 +23,10 @@ Standard SSH key exchange ("kex" if you wanna sound cool). Diffie-Hellman of from Crypto.Hash import SHA -from paramiko.common import * -from paramiko import util -from paramiko.message import Message -from paramiko.ssh_exception import SSHException +from ssh.common import * +from ssh import util +from ssh.message import Message +from ssh.ssh_exception import SSHException _MSG_KEXDH_INIT, _MSG_KEXDH_REPLY = range(30, 32) diff --git a/paramiko/logging22.py b/ssh/logging22.py similarity index 83% rename from paramiko/logging22.py rename to ssh/logging22.py index ed1d891..7be2b69 100644 --- a/paramiko/logging22.py +++ b/ssh/logging22.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/paramiko/message.py b/ssh/message.py similarity index 96% rename from paramiko/message.py rename to ssh/message.py index 366c43c..8102939 100644 --- a/paramiko/message.py +++ b/ssh/message.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -23,7 +23,7 @@ Implementation of an SSH2 "message". import struct import cStringIO -from paramiko import util +from ssh import util class Message (object): @@ -34,7 +34,7 @@ class Message (object): Normally you don't need to deal with anything this low-level, but it's exposed for people implementing custom extensions, or features that - paramiko doesn't support yet. + ssh doesn't support yet. """ def __init__(self, content=None): diff --git a/paramiko/packet.py b/ssh/packet.py similarity index 97% rename from paramiko/packet.py rename to ssh/packet.py index 391c5d5..8ac8c4d 100644 --- a/paramiko/packet.py +++ b/ssh/packet.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -27,10 +27,10 @@ import struct import threading import time -from paramiko.common import * -from paramiko import util -from paramiko.ssh_exception import SSHException -from paramiko.message import Message +from ssh.common import * +from ssh import util +from ssh.ssh_exception import SSHException +from ssh.message import Message got_r_hmac = False diff --git a/paramiko/pipe.py b/ssh/pipe.py similarity index 93% rename from paramiko/pipe.py rename to ssh/pipe.py index 37191ef..c36845a 100644 --- a/paramiko/pipe.py +++ b/ssh/pipe.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/paramiko/pkey.py b/ssh/pkey.py similarity index 96% rename from paramiko/pkey.py rename to ssh/pkey.py index 3e71222..e284562 100644 --- a/paramiko/pkey.py +++ b/ssh/pkey.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -27,10 +27,10 @@ import os from Crypto.Hash import MD5 from Crypto.Cipher import DES3, AES -from paramiko.common import * -from paramiko import util -from paramiko.message import Message -from paramiko.ssh_exception import SSHException, PasswordRequiredException +from ssh.common import * +from ssh import util +from ssh.message import Message +from ssh.ssh_exception import SSHException, PasswordRequiredException class PKey (object): @@ -331,7 +331,7 @@ class PKey (object): def _write_private_key_file(self, tag, filename, data, password=None): """ Write an SSH2-format private key file in a form that can be read by - paramiko or openssh. If no password is given, the key is written in + ssh or openssh. If no password is given, the key is written in a trivially-encoded format (base64) which is completely insecure. If a password is given, DES-EDE3-CBC is used. diff --git a/paramiko/primes.py b/ssh/primes.py similarity index 93% rename from paramiko/primes.py rename to ssh/primes.py index 9ebfec1..475b6e6 100644 --- a/paramiko/primes.py +++ b/ssh/primes.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -22,8 +22,8 @@ Utility functions for dealing with primes. from Crypto.Util import number -from paramiko import util -from paramiko.ssh_exception import SSHException +from ssh import util +from ssh.ssh_exception import SSHException def _generate_prime(bits, rng): diff --git a/paramiko/resource.py b/ssh/resource.py similarity index 89% rename from paramiko/resource.py rename to ssh/resource.py index 0d5c82f..75702d1 100644 --- a/paramiko/resource.py +++ b/ssh/resource.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/paramiko/rsakey.py b/ssh/rsakey.py similarity index 92% rename from paramiko/rsakey.py rename to ssh/rsakey.py index 1e2d8f9..f3f2d9c 100644 --- a/paramiko/rsakey.py +++ b/ssh/rsakey.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -24,12 +24,12 @@ from Crypto.PublicKey import RSA from Crypto.Hash import SHA, MD5 from Crypto.Cipher import DES3 -from paramiko.common import * -from paramiko import util -from paramiko.message import Message -from paramiko.ber import BER, BERException -from paramiko.pkey import PKey -from paramiko.ssh_exception import SSHException +from ssh.common import * +from ssh import util +from ssh.message import Message +from ssh.ber import BER, BERException +from ssh.pkey import PKey +from ssh.ssh_exception import SSHException class RSAKey (PKey): diff --git a/paramiko/server.py b/ssh/server.py similarity index 98% rename from paramiko/server.py rename to ssh/server.py index 6424b63..9bf80fd 100644 --- a/paramiko/server.py +++ b/ssh/server.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -21,8 +21,8 @@ L{ServerInterface} is an interface to override for server support. """ import threading -from paramiko.common import * -from paramiko import util +from ssh.common import * +from ssh import util class InteractiveQuery (object): @@ -69,10 +69,10 @@ class InteractiveQuery (object): class ServerInterface (object): """ - This class defines an interface for controlling the behavior of paramiko + This class defines an interface for controlling the behavior of ssh in server mode. - Methods on this class are called from paramiko's primary thread, so you + Methods on this class are called from ssh's primary thread, so you shouldn't do too much work in them. (Certainly nothing that blocks or sleeps.) """ @@ -202,7 +202,7 @@ class ServerInterface (object): options it has for continuing the authentication.) Note that you don't have to actually verify any key signtature here. - If you're willing to accept the key, paramiko will do the work of + If you're willing to accept the key, ssh will do the work of verifying the client's signature. The default implementation always returns L{AUTH_FAILED}. diff --git a/paramiko/sftp.py b/ssh/sftp.py similarity index 91% rename from paramiko/sftp.py rename to ssh/sftp.py index a0b08e0..6d0f8f1 100644 --- a/paramiko/sftp.py +++ b/ssh/sftp.py @@ -1,29 +1,29 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. import select import socket import struct -from paramiko.common import * -from paramiko import util -from paramiko.channel import Channel -from paramiko.message import Message +from ssh.common import * +from ssh import util +from ssh.channel import Channel +from ssh.message import Message CMD_INIT, CMD_VERSION, CMD_OPEN, CMD_CLOSE, CMD_READ, CMD_WRITE, CMD_LSTAT, CMD_FSTAT, \ @@ -95,7 +95,7 @@ class SFTPError (Exception): class BaseSFTP (object): def __init__(self): - self.logger = util.get_logger('paramiko.sftp') + self.logger = util.get_logger('ssh.sftp') self.sock = None self.ultra_debug = False @@ -146,7 +146,7 @@ class BaseSFTP (object): while n > 0: if isinstance(self.sock, socket.socket): # sometimes sftp is used directly over a socket instead of - # through a paramiko channel. in this case, check periodically + # through a ssh channel. in this case, check periodically # if the socket is closed. (for some reason, recv() won't ever # return or raise an exception, but calling select on a closed # socket will.) diff --git a/paramiko/sftp_attr.py b/ssh/sftp_attr.py similarity index 95% rename from paramiko/sftp_attr.py rename to ssh/sftp_attr.py index 1f09421..09d9cf9 100644 --- a/paramiko/sftp_attr.py +++ b/ssh/sftp_attr.py @@ -1,25 +1,25 @@ # Copyright (C) 2003-2006 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. import stat import time -from paramiko.common import * -from paramiko.sftp import * +from ssh.common import * +from ssh.sftp import * class SFTPAttributes (object): diff --git a/paramiko/sftp_client.py b/ssh/sftp_client.py similarity index 97% rename from paramiko/sftp_client.py rename to ssh/sftp_client.py index 79a7761..af2b02d 100644 --- a/paramiko/sftp_client.py +++ b/ssh/sftp_client.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -28,10 +28,10 @@ import threading import time import weakref -from paramiko.sftp import * -from paramiko.sftp_attr import SFTPAttributes -from paramiko.ssh_exception import SSHException -from paramiko.sftp_file import SFTPFile +from ssh.sftp import * +from ssh.sftp_attr import SFTPAttributes +from ssh.ssh_exception import SSHException +from ssh.sftp_file import SFTPFile def _to_unicode(s): @@ -501,7 +501,7 @@ class SFTPClient (BaseSFTP): """ Change the "current directory" of this SFTP session. Since SFTP doesn't really have the concept of a current working directory, this - is emulated by paramiko. Once you use this method to set a working + is emulated by ssh. Once you use this method to set a working directory, all operations on this SFTPClient object will be relative to that path. You can pass in C{None} to stop using a current working directory. @@ -523,7 +523,7 @@ class SFTPClient (BaseSFTP): def getcwd(self): """ Return the "current working directory" for this SFTP session, as - emulated by paramiko. If no directory has been set with L{chdir}, + emulated by ssh. If no directory has been set with L{chdir}, this method will return C{None}. @return: the current working directory on the server, or C{None} diff --git a/paramiko/sftp_file.py b/ssh/sftp_file.py similarity index 97% rename from paramiko/sftp_file.py rename to ssh/sftp_file.py index 8c5c7ac..8700bb8 100644 --- a/paramiko/sftp_file.py +++ b/ssh/sftp_file.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -25,10 +25,10 @@ import socket import threading import time -from paramiko.common import * -from paramiko.sftp import * -from paramiko.file import BufferedFile -from paramiko.sftp_attr import SFTPAttributes +from ssh.common import * +from ssh.sftp import * +from ssh.file import BufferedFile +from ssh.sftp_attr import SFTPAttributes class SFTPFile (BufferedFile): @@ -349,7 +349,7 @@ class SFTPFile (BufferedFile): def set_pipelined(self, pipelined=True): """ Turn on/off the pipelining of write operations to this file. When - pipelining is on, paramiko won't wait for the server response after + pipelining is on, ssh won't wait for the server response after each write operation. Instead, they're collected as they come in. At the first non-write operation (including L{close}), all remaining server responses are collected. This means that if there was an error diff --git a/paramiko/sftp_handle.py b/ssh/sftp_handle.py similarity index 95% rename from paramiko/sftp_handle.py rename to ssh/sftp_handle.py index a6cd44a..8b894d4 100644 --- a/paramiko/sftp_handle.py +++ b/ssh/sftp_handle.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -22,8 +22,8 @@ Abstraction of an SFTP file handle (for server mode). import os -from paramiko.common import * -from paramiko.sftp import * +from ssh.common import * +from ssh.sftp import * class SFTPHandle (object): @@ -199,4 +199,4 @@ class SFTPHandle (object): self.__name = name -from paramiko.sftp_server import SFTPServer +from ssh.sftp_server import SFTPServer diff --git a/paramiko/sftp_server.py b/ssh/sftp_server.py similarity index 97% rename from paramiko/sftp_server.py rename to ssh/sftp_server.py index 7cc6c0c..a4ecec5 100644 --- a/paramiko/sftp_server.py +++ b/ssh/sftp_server.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -24,11 +24,11 @@ import os import errno from Crypto.Hash import MD5, SHA -from paramiko.common import * -from paramiko.server import SubsystemHandler -from paramiko.sftp import * -from paramiko.sftp_si import * -from paramiko.sftp_attr import * +from ssh.common import * +from ssh.server import SubsystemHandler +from ssh.sftp import * +from ssh.sftp_si import * +from ssh.sftp_attr import * # known hash algorithms for the "check-file" extension @@ -441,4 +441,4 @@ class SFTPServer (BaseSFTP, SubsystemHandler): self._send_status(request_number, SFTP_OP_UNSUPPORTED) -from paramiko.sftp_handle import SFTPHandle +from ssh.sftp_handle import SFTPHandle diff --git a/paramiko/sftp_si.py b/ssh/sftp_si.py similarity index 97% rename from paramiko/sftp_si.py rename to ssh/sftp_si.py index 401a4e9..12d9461 100644 --- a/paramiko/sftp_si.py +++ b/ssh/sftp_si.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -22,13 +22,13 @@ L{SFTPServerInterface} is an interface to override for SFTP server support. import os -from paramiko.common import * -from paramiko.sftp import * +from ssh.common import * +from ssh.sftp import * class SFTPServerInterface (object): """ - This class defines an interface for controlling the behavior of paramiko + This class defines an interface for controlling the behavior of ssh when using the L{SFTPServer} subsystem to provide an SFTP server. Methods on this class are called from the SFTP session's thread, so you can diff --git a/paramiko/ssh_exception.py b/ssh/ssh_exception.py similarity index 91% rename from paramiko/ssh_exception.py rename to ssh/ssh_exception.py index 68924d0..5302d0f 100644 --- a/paramiko/ssh_exception.py +++ b/ssh/ssh_exception.py @@ -1,23 +1,23 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -Exceptions defined by paramiko. +Exceptions defined by ssh. """ diff --git a/paramiko/transport.py b/ssh/transport.py similarity index 98% rename from paramiko/transport.py rename to ssh/transport.py index 30de295..f7d330b 100644 --- a/paramiko/transport.py +++ b/ssh/transport.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -29,21 +29,21 @@ import threading import time import weakref -from paramiko import util -from paramiko.auth_handler import AuthHandler -from paramiko.channel import Channel -from paramiko.common import * -from paramiko.compress import ZlibCompressor, ZlibDecompressor -from paramiko.dsskey import DSSKey -from paramiko.kex_gex import KexGex -from paramiko.kex_group1 import KexGroup1 -from paramiko.message import Message -from paramiko.packet import Packetizer, NeedRekeyException -from paramiko.primes import ModulusPack -from paramiko.rsakey import RSAKey -from paramiko.server import ServerInterface -from paramiko.sftp_client import SFTPClient -from paramiko.ssh_exception import SSHException, BadAuthenticationType, ChannelException +from ssh import util +from ssh.auth_handler import AuthHandler +from ssh.channel import Channel +from ssh.common import * +from ssh.compress import ZlibCompressor, ZlibDecompressor +from ssh.dsskey import DSSKey +from ssh.kex_gex import KexGex +from ssh.kex_group1 import KexGroup1 +from ssh.message import Message +from ssh.packet import Packetizer, NeedRekeyException +from ssh.primes import ModulusPack +from ssh.rsakey import RSAKey +from ssh.server import ServerInterface +from ssh.sftp_client import SFTPClient +from ssh.ssh_exception import SSHException, BadAuthenticationType, ChannelException from Crypto import Random from Crypto.Cipher import Blowfish, AES, DES3, ARC4 @@ -51,7 +51,7 @@ from Crypto.Hash import SHA, MD5 try: from Crypto.Util import Counter except ImportError: - from paramiko.util import Counter + from ssh.util import Counter # for thread cleanup @@ -71,7 +71,7 @@ class SecurityOptions (object): Changing the contents and/or order of these fields affects the underlying L{Transport} (but only if you change them before starting the session). - If you try to add an algorithm that paramiko doesn't recognize, + If you try to add an algorithm that ssh doesn't recognize, C{ValueError} will be raised. If you try to assign something besides a tuple to one of the fields, C{TypeError} will be raised. """ @@ -86,7 +86,7 @@ class SecurityOptions (object): @rtype: str """ - return '' % repr(self._transport) + return '' % repr(self._transport) def _get_ciphers(self): return self._transport._preferred_ciphers @@ -348,7 +348,7 @@ class Transport (threading.Thread): self.clear_to_send = threading.Event() self.clear_to_send_lock = threading.Lock() self.clear_to_send_timeout = 30.0 - self.log_name = 'paramiko.transport' + self.log_name = 'ssh.transport' self.logger = util.get_logger(self.log_name) self.packetizer.set_log(self.logger) self.auth_handler = None @@ -370,7 +370,7 @@ class Transport (threading.Thread): @rtype: str """ - out = ' # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -Useful functions used by the rest of paramiko. +Useful functions used by the rest of ssh. """ from __future__ import generators @@ -29,8 +29,8 @@ import struct import traceback import threading -from paramiko.common import * -from paramiko.config import SSHConfig +from ssh.common import * +from ssh.config import SSHConfig # Change by RogerB - python < 2.3 doesn't have enumerate so we implement it @@ -184,7 +184,7 @@ def generate_key_bytes(hashclass, salt, key, nbytes): def load_host_keys(filename): """ Read a file of known SSH host keys, in the format used by openssh, and - return a compound dict of C{hostname -> keytype ->} L{PKey }. + return a compound dict of C{hostname -> keytype ->} L{PKey }. The hostname may be an IP address or DNS name. The keytype will be either C{"ssh-rsa"} or C{"ssh-dss"}. @@ -196,9 +196,9 @@ def load_host_keys(filename): @param filename: name of the file to read host keys from @type filename: str @return: dict of host keys, indexed by hostname and then keytype - @rtype: dict(hostname, dict(keytype, L{PKey })) + @rtype: dict(hostname, dict(keytype, L{PKey })) """ - from paramiko.hostkeys import HostKeys + from ssh.hostkeys import HostKeys return HostKeys(filename) def parse_ssh_config(file_obj): @@ -247,8 +247,8 @@ def get_thread_id(): return ret def log_to_file(filename, level=DEBUG): - "send paramiko logs to a logfile, if they're not already going somewhere" - l = logging.getLogger("paramiko") + "send ssh logs to a logfile, if they're not already going somewhere" + l = logging.getLogger("ssh") if len(l.handlers) > 0: return l.setLevel(level) diff --git a/paramiko/win_pageant.py b/ssh/win_pageant.py similarity index 94% rename from paramiko/win_pageant.py rename to ssh/win_pageant.py index 787032b..262e91d 100644 --- a/paramiko/win_pageant.py +++ b/ssh/win_pageant.py @@ -1,20 +1,20 @@ # Copyright (C) 2005 John Arbash-Meinel # Modified up by: Todd Whiteman # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/test.py b/test.py index c0e9d15..a6eb766 100755 --- a/test.py +++ b/test.py @@ -2,20 +2,20 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -27,7 +27,7 @@ import re import sys import unittest from optparse import OptionParser -import paramiko +import ssh sys.path.append('tests') @@ -105,7 +105,7 @@ def main(): options, args = parser.parse_args() # setup logging - paramiko.util.log_to_file('test.log') + ssh.util.log_to_file('test.log') if options.use_sftp: if options.use_loopback_sftp: diff --git a/tests/loop.py b/tests/loop.py index bdc2f2d..4e5ed93 100644 --- a/tests/loop.py +++ b/tests/loop.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ diff --git a/tests/stub_sftp.py b/tests/stub_sftp.py index 7f1ecc7..54ba1ab 100644 --- a/tests/stub_sftp.py +++ b/tests/stub_sftp.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -21,7 +21,7 @@ A stub SFTP server for loopback SFTP testing. """ import os -from paramiko import ServerInterface, SFTPServerInterface, SFTPServer, SFTPAttributes, \ +from ssh import ServerInterface, SFTPServerInterface, SFTPServer, SFTPAttributes, \ SFTPHandle, SFTP_OK, AUTH_SUCCESSFUL, OPEN_SUCCEEDED diff --git a/tests/test_auth.py b/tests/test_auth.py index 816e978..ef8e965 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -1,19 +1,19 @@ # Copyright (C) 2008 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -24,11 +24,11 @@ import sys import threading import unittest -from paramiko import Transport, ServerInterface, RSAKey, DSSKey, \ +from ssh import Transport, ServerInterface, RSAKey, DSSKey, \ SSHException, BadAuthenticationType, InteractiveQuery, ChannelException, \ AuthenticationException -from paramiko import AUTH_FAILED, AUTH_PARTIALLY_SUCCESSFUL, AUTH_SUCCESSFUL -from paramiko import OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED +from ssh import AUTH_FAILED, AUTH_PARTIALLY_SUCCESSFUL, AUTH_SUCCESSFUL +from ssh import OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED from loop import LoopSocket diff --git a/tests/test_buffered_pipe.py b/tests/test_buffered_pipe.py index f285d05..07a3515 100644 --- a/tests/test_buffered_pipe.py +++ b/tests/test_buffered_pipe.py @@ -1,19 +1,19 @@ # Copyright (C) 2006-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -23,8 +23,8 @@ Some unit tests for BufferedPipe. import threading import time import unittest -from paramiko.buffered_pipe import BufferedPipe, PipeTimeout -from paramiko import pipe +from ssh.buffered_pipe import BufferedPipe, PipeTimeout +from ssh import pipe def delay_thread(pipe): diff --git a/tests/test_client.py b/tests/test_client.py index 2f9b9a7..1ef38ef 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -27,10 +27,10 @@ import unittest import weakref from binascii import hexlify -import paramiko +import ssh -class NullServer (paramiko.ServerInterface): +class NullServer (ssh.ServerInterface): def get_allowed_auths(self, username): if username == 'slowdive': @@ -39,16 +39,16 @@ class NullServer (paramiko.ServerInterface): def check_auth_password(self, username, password): if (username == 'slowdive') and (password == 'pygmalion'): - return paramiko.AUTH_SUCCESSFUL - return paramiko.AUTH_FAILED + return ssh.AUTH_SUCCESSFUL + return ssh.AUTH_FAILED def check_auth_publickey(self, username, key): if (key.get_name() == 'ssh-dss') and (hexlify(key.get_fingerprint()) == '4478f0b9a23cc5182009ff755bc1d26c'): - return paramiko.AUTH_SUCCESSFUL - return paramiko.AUTH_FAILED + return ssh.AUTH_SUCCESSFUL + return ssh.AUTH_FAILED def check_channel_request(self, kind, chanid): - return paramiko.OPEN_SUCCEEDED + return ssh.OPEN_SUCCEEDED def check_channel_exec_request(self, channel, command): if command != 'yes': @@ -76,8 +76,8 @@ class SSHClientTest (unittest.TestCase): def _run(self): self.socks, addr = self.sockl.accept() - self.ts = paramiko.Transport(self.socks) - host_key = paramiko.RSAKey.from_private_key_file('tests/test_rsa.key') + self.ts = ssh.Transport(self.socks) + host_key = ssh.RSAKey.from_private_key_file('tests/test_rsa.key') self.ts.add_server_key(host_key) server = NullServer() self.ts.start_server(self.event, server) @@ -87,10 +87,10 @@ class SSHClientTest (unittest.TestCase): """ verify that the SSHClient stuff works too. """ - host_key = paramiko.RSAKey.from_private_key_file('tests/test_rsa.key') - public_host_key = paramiko.RSAKey(data=str(host_key)) + host_key = ssh.RSAKey.from_private_key_file('tests/test_rsa.key') + public_host_key = ssh.RSAKey(data=str(host_key)) - self.tc = paramiko.SSHClient() + self.tc = ssh.SSHClient() self.tc.get_host_keys().add('[%s]:%d' % (self.addr, self.port), 'ssh-rsa', public_host_key) self.tc.connect(self.addr, self.port, username='slowdive', password='pygmalion') @@ -120,10 +120,10 @@ class SSHClientTest (unittest.TestCase): """ verify that SSHClient works with a DSA key. """ - host_key = paramiko.RSAKey.from_private_key_file('tests/test_rsa.key') - public_host_key = paramiko.RSAKey(data=str(host_key)) + host_key = ssh.RSAKey.from_private_key_file('tests/test_rsa.key') + public_host_key = ssh.RSAKey(data=str(host_key)) - self.tc = paramiko.SSHClient() + self.tc = ssh.SSHClient() self.tc.get_host_keys().add('[%s]:%d' % (self.addr, self.port), 'ssh-rsa', public_host_key) self.tc.connect(self.addr, self.port, username='slowdive', key_filename='tests/test_dss.key') @@ -153,10 +153,10 @@ class SSHClientTest (unittest.TestCase): """ verify that SSHClient accepts and tries multiple key files. """ - host_key = paramiko.RSAKey.from_private_key_file('tests/test_rsa.key') - public_host_key = paramiko.RSAKey(data=str(host_key)) + host_key = ssh.RSAKey.from_private_key_file('tests/test_rsa.key') + public_host_key = ssh.RSAKey(data=str(host_key)) - self.tc = paramiko.SSHClient() + self.tc = ssh.SSHClient() self.tc.get_host_keys().add('[%s]:%d' % (self.addr, self.port), 'ssh-rsa', public_host_key) self.tc.connect(self.addr, self.port, username='slowdive', key_filename=[ 'tests/test_rsa.key', 'tests/test_dss.key' ]) @@ -170,11 +170,11 @@ class SSHClientTest (unittest.TestCase): """ verify that SSHClient's AutoAddPolicy works. """ - host_key = paramiko.RSAKey.from_private_key_file('tests/test_rsa.key') - public_host_key = paramiko.RSAKey(data=str(host_key)) + host_key = ssh.RSAKey.from_private_key_file('tests/test_rsa.key') + public_host_key = ssh.RSAKey(data=str(host_key)) - self.tc = paramiko.SSHClient() - self.tc.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + self.tc = ssh.SSHClient() + self.tc.set_missing_host_key_policy(ssh.AutoAddPolicy()) self.assertEquals(0, len(self.tc.get_host_keys())) self.tc.connect(self.addr, self.port, username='slowdive', password='pygmalion') @@ -191,11 +191,11 @@ class SSHClientTest (unittest.TestCase): verify that when an SSHClient is collected, its transport (and the transport's packetizer) is closed. """ - host_key = paramiko.RSAKey.from_private_key_file('tests/test_rsa.key') - public_host_key = paramiko.RSAKey(data=str(host_key)) + host_key = ssh.RSAKey.from_private_key_file('tests/test_rsa.key') + public_host_key = ssh.RSAKey(data=str(host_key)) - self.tc = paramiko.SSHClient() - self.tc.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + self.tc = ssh.SSHClient() + self.tc.set_missing_host_key_policy(ssh.AutoAddPolicy()) self.assertEquals(0, len(self.tc.get_host_keys())) self.tc.connect(self.addr, self.port, username='slowdive', password='pygmalion') diff --git a/tests/test_file.py b/tests/test_file.py index c539b22..4cbdaff 100755 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -21,7 +21,7 @@ Some unit tests for the BufferedFile abstraction. """ import unittest -from paramiko.file import BufferedFile +from ssh.file import BufferedFile class LoopbackFile (BufferedFile): diff --git a/tests/test_hostkeys.py b/tests/test_hostkeys.py index e28a41d..21330dc 100644 --- a/tests/test_hostkeys.py +++ b/tests/test_hostkeys.py @@ -1,19 +1,19 @@ # Copyright (C) 2006-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -24,7 +24,7 @@ import base64 from binascii import hexlify import os import unittest -import paramiko +import ssh test_hosts_file = """\ @@ -63,7 +63,7 @@ class HostKeysTest (unittest.TestCase): os.unlink('hostfile.temp') def test_1_load(self): - hostdict = paramiko.HostKeys('hostfile.temp') + hostdict = ssh.HostKeys('hostfile.temp') self.assertEquals(2, len(hostdict)) self.assertEquals(1, len(hostdict.values()[0])) self.assertEquals(1, len(hostdict.values()[1])) @@ -71,9 +71,9 @@ class HostKeysTest (unittest.TestCase): self.assertEquals('E6684DB30E109B67B70FF1DC5C7F1363', fp) def test_2_add(self): - hostdict = paramiko.HostKeys('hostfile.temp') + hostdict = ssh.HostKeys('hostfile.temp') hh = '|1|BMsIC6cUIP2zBuXR3t2LRcJYjzM=|hpkJMysjTk/+zzUUzxQEa2ieq6c=' - key = paramiko.RSAKey(data=base64.decodestring(keyblob)) + key = ssh.RSAKey(data=base64.decodestring(keyblob)) hostdict.add(hh, 'ssh-rsa', key) self.assertEquals(3, len(hostdict)) x = hostdict['foo.example.com'] @@ -82,7 +82,7 @@ class HostKeysTest (unittest.TestCase): self.assert_(hostdict.check('foo.example.com', key)) def test_3_dict(self): - hostdict = paramiko.HostKeys('hostfile.temp') + hostdict = ssh.HostKeys('hostfile.temp') self.assert_('secure.example.com' in hostdict) self.assert_('not.example.com' not in hostdict) self.assert_(hostdict.has_key('secure.example.com')) @@ -97,9 +97,9 @@ class HostKeysTest (unittest.TestCase): self.assertEquals(2, i) def test_4_dict_set(self): - hostdict = paramiko.HostKeys('hostfile.temp') - key = paramiko.RSAKey(data=base64.decodestring(keyblob)) - key_dss = paramiko.DSSKey(data=base64.decodestring(keyblob_dss)) + hostdict = ssh.HostKeys('hostfile.temp') + key = ssh.RSAKey(data=base64.decodestring(keyblob)) + key_dss = ssh.DSSKey(data=base64.decodestring(keyblob_dss)) hostdict['secure.example.com'] = { 'ssh-rsa': key, 'ssh-dss': key_dss diff --git a/tests/test_kex.py b/tests/test_kex.py index f6e6996..06f4916 100644 --- a/tests/test_kex.py +++ b/tests/test_kex.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -22,10 +22,10 @@ Some unit tests for the key exchange protocols. from binascii import hexlify import unittest -import paramiko.util -from paramiko.kex_group1 import KexGroup1 -from paramiko.kex_gex import KexGex -from paramiko import Message +import ssh.util +from ssh.kex_group1 import KexGroup1 +from ssh.kex_gex import KexGex +from ssh import Message class FakeRng (object): @@ -90,7 +90,7 @@ class KexTest (unittest.TestCase): kex.start_kex() x = '1E000000807E2DDB1743F3487D6545F04F1C8476092FB912B013626AB5BCEB764257D88BBA64243B9F348DF7B41B8C814A995E00299913503456983FFB9178D3CD79EB6D55522418A8ABF65375872E55938AB99A84A0B5FC8A1ECC66A7C3766E7E0F80B7CE2C9225FC2DD683F4764244B72963BBB383F529DCF0C5D17740B8A2ADBE9208D4' self.assertEquals(x, hexlify(str(transport._message)).upper()) - self.assertEquals((paramiko.kex_group1._MSG_KEXDH_REPLY,), transport._expect) + self.assertEquals((ssh.kex_group1._MSG_KEXDH_REPLY,), transport._expect) # fake "reply" msg = Message() @@ -98,7 +98,7 @@ class KexTest (unittest.TestCase): msg.add_mpint(69) msg.add_string('fake-sig') msg.rewind() - kex.parse_next(paramiko.kex_group1._MSG_KEXDH_REPLY, msg) + kex.parse_next(ssh.kex_group1._MSG_KEXDH_REPLY, msg) H = '03079780F3D3AD0B3C6DB30C8D21685F367A86D2' self.assertEquals(self.K, transport._K) self.assertEquals(H, hexlify(transport._H).upper()) @@ -110,12 +110,12 @@ class KexTest (unittest.TestCase): transport.server_mode = True kex = KexGroup1(transport) kex.start_kex() - self.assertEquals((paramiko.kex_group1._MSG_KEXDH_INIT,), transport._expect) + self.assertEquals((ssh.kex_group1._MSG_KEXDH_INIT,), transport._expect) msg = Message() msg.add_mpint(69) msg.rewind() - kex.parse_next(paramiko.kex_group1._MSG_KEXDH_INIT, msg) + kex.parse_next(ssh.kex_group1._MSG_KEXDH_INIT, msg) H = 'B16BF34DD10945EDE84E9C1EF24A14BFDC843389' x = '1F0000000866616B652D6B6579000000807E2DDB1743F3487D6545F04F1C8476092FB912B013626AB5BCEB764257D88BBA64243B9F348DF7B41B8C814A995E00299913503456983FFB9178D3CD79EB6D55522418A8ABF65375872E55938AB99A84A0B5FC8A1ECC66A7C3766E7E0F80B7CE2C9225FC2DD683F4764244B72963BBB383F529DCF0C5D17740B8A2ADBE9208D40000000866616B652D736967' self.assertEquals(self.K, transport._K) @@ -130,23 +130,23 @@ class KexTest (unittest.TestCase): kex.start_kex() x = '22000004000000080000002000' self.assertEquals(x, hexlify(str(transport._message)).upper()) - self.assertEquals((paramiko.kex_gex._MSG_KEXDH_GEX_GROUP,), transport._expect) + self.assertEquals((ssh.kex_gex._MSG_KEXDH_GEX_GROUP,), transport._expect) msg = Message() msg.add_mpint(FakeModulusPack.P) msg.add_mpint(FakeModulusPack.G) msg.rewind() - kex.parse_next(paramiko.kex_gex._MSG_KEXDH_GEX_GROUP, msg) + kex.parse_next(ssh.kex_gex._MSG_KEXDH_GEX_GROUP, msg) x = '20000000807E2DDB1743F3487D6545F04F1C8476092FB912B013626AB5BCEB764257D88BBA64243B9F348DF7B41B8C814A995E00299913503456983FFB9178D3CD79EB6D55522418A8ABF65375872E55938AB99A84A0B5FC8A1ECC66A7C3766E7E0F80B7CE2C9225FC2DD683F4764244B72963BBB383F529DCF0C5D17740B8A2ADBE9208D4' self.assertEquals(x, hexlify(str(transport._message)).upper()) - self.assertEquals((paramiko.kex_gex._MSG_KEXDH_GEX_REPLY,), transport._expect) + self.assertEquals((ssh.kex_gex._MSG_KEXDH_GEX_REPLY,), transport._expect) msg = Message() msg.add_string('fake-host-key') msg.add_mpint(69) msg.add_string('fake-sig') msg.rewind() - kex.parse_next(paramiko.kex_gex._MSG_KEXDH_GEX_REPLY, msg) + kex.parse_next(ssh.kex_gex._MSG_KEXDH_GEX_REPLY, msg) H = 'A265563F2FA87F1A89BF007EE90D58BE2E4A4BD0' self.assertEquals(self.K, transport._K) self.assertEquals(H, hexlify(transport._H).upper()) @@ -160,23 +160,23 @@ class KexTest (unittest.TestCase): kex.start_kex(_test_old_style=True) x = '1E00000800' self.assertEquals(x, hexlify(str(transport._message)).upper()) - self.assertEquals((paramiko.kex_gex._MSG_KEXDH_GEX_GROUP,), transport._expect) + self.assertEquals((ssh.kex_gex._MSG_KEXDH_GEX_GROUP,), transport._expect) msg = Message() msg.add_mpint(FakeModulusPack.P) msg.add_mpint(FakeModulusPack.G) msg.rewind() - kex.parse_next(paramiko.kex_gex._MSG_KEXDH_GEX_GROUP, msg) + kex.parse_next(ssh.kex_gex._MSG_KEXDH_GEX_GROUP, msg) x = '20000000807E2DDB1743F3487D6545F04F1C8476092FB912B013626AB5BCEB764257D88BBA64243B9F348DF7B41B8C814A995E00299913503456983FFB9178D3CD79EB6D55522418A8ABF65375872E55938AB99A84A0B5FC8A1ECC66A7C3766E7E0F80B7CE2C9225FC2DD683F4764244B72963BBB383F529DCF0C5D17740B8A2ADBE9208D4' self.assertEquals(x, hexlify(str(transport._message)).upper()) - self.assertEquals((paramiko.kex_gex._MSG_KEXDH_GEX_REPLY,), transport._expect) + self.assertEquals((ssh.kex_gex._MSG_KEXDH_GEX_REPLY,), transport._expect) msg = Message() msg.add_string('fake-host-key') msg.add_mpint(69) msg.add_string('fake-sig') msg.rewind() - kex.parse_next(paramiko.kex_gex._MSG_KEXDH_GEX_REPLY, msg) + kex.parse_next(ssh.kex_gex._MSG_KEXDH_GEX_REPLY, msg) H = '807F87B269EF7AC5EC7E75676808776A27D5864C' self.assertEquals(self.K, transport._K) self.assertEquals(H, hexlify(transport._H).upper()) @@ -188,22 +188,22 @@ class KexTest (unittest.TestCase): transport.server_mode = True kex = KexGex(transport) kex.start_kex() - self.assertEquals((paramiko.kex_gex._MSG_KEXDH_GEX_REQUEST, paramiko.kex_gex._MSG_KEXDH_GEX_REQUEST_OLD), transport._expect) + self.assertEquals((ssh.kex_gex._MSG_KEXDH_GEX_REQUEST, ssh.kex_gex._MSG_KEXDH_GEX_REQUEST_OLD), transport._expect) msg = Message() msg.add_int(1024) msg.add_int(2048) msg.add_int(4096) msg.rewind() - kex.parse_next(paramiko.kex_gex._MSG_KEXDH_GEX_REQUEST, msg) + kex.parse_next(ssh.kex_gex._MSG_KEXDH_GEX_REQUEST, msg) x = '1F0000008100FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF0000000102' self.assertEquals(x, hexlify(str(transport._message)).upper()) - self.assertEquals((paramiko.kex_gex._MSG_KEXDH_GEX_INIT,), transport._expect) + self.assertEquals((ssh.kex_gex._MSG_KEXDH_GEX_INIT,), transport._expect) msg = Message() msg.add_mpint(12345) msg.rewind() - kex.parse_next(paramiko.kex_gex._MSG_KEXDH_GEX_INIT, msg) + kex.parse_next(ssh.kex_gex._MSG_KEXDH_GEX_INIT, msg) K = 67592995013596137876033460028393339951879041140378510871612128162185209509220726296697886624612526735888348020498716482757677848959420073720160491114319163078862905400020959196386947926388406687288901564192071077389283980347784184487280885335302632305026248574716290537036069329724382811853044654824945750581L H = 'CE754197C21BF3452863B4F44D0B3951F12516EF' x = '210000000866616B652D6B6579000000807E2DDB1743F3487D6545F04F1C8476092FB912B013626AB5BCEB764257D88BBA64243B9F348DF7B41B8C814A995E00299913503456983FFB9178D3CD79EB6D55522418A8ABF65375872E55938AB99A84A0B5FC8A1ECC66A7C3766E7E0F80B7CE2C9225FC2DD683F4764244B72963BBB383F529DCF0C5D17740B8A2ADBE9208D40000000866616B652D736967' @@ -217,20 +217,20 @@ class KexTest (unittest.TestCase): transport.server_mode = True kex = KexGex(transport) kex.start_kex() - self.assertEquals((paramiko.kex_gex._MSG_KEXDH_GEX_REQUEST, paramiko.kex_gex._MSG_KEXDH_GEX_REQUEST_OLD), transport._expect) + self.assertEquals((ssh.kex_gex._MSG_KEXDH_GEX_REQUEST, ssh.kex_gex._MSG_KEXDH_GEX_REQUEST_OLD), transport._expect) msg = Message() msg.add_int(2048) msg.rewind() - kex.parse_next(paramiko.kex_gex._MSG_KEXDH_GEX_REQUEST_OLD, msg) + kex.parse_next(ssh.kex_gex._MSG_KEXDH_GEX_REQUEST_OLD, msg) x = '1F0000008100FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF0000000102' self.assertEquals(x, hexlify(str(transport._message)).upper()) - self.assertEquals((paramiko.kex_gex._MSG_KEXDH_GEX_INIT,), transport._expect) + self.assertEquals((ssh.kex_gex._MSG_KEXDH_GEX_INIT,), transport._expect) msg = Message() msg.add_mpint(12345) msg.rewind() - kex.parse_next(paramiko.kex_gex._MSG_KEXDH_GEX_INIT, msg) + kex.parse_next(ssh.kex_gex._MSG_KEXDH_GEX_INIT, msg) K = 67592995013596137876033460028393339951879041140378510871612128162185209509220726296697886624612526735888348020498716482757677848959420073720160491114319163078862905400020959196386947926388406687288901564192071077389283980347784184487280885335302632305026248574716290537036069329724382811853044654824945750581L H = 'B41A06B2E59043CEFC1AE16EC31F1E2D12EC455B' x = '210000000866616B652D6B6579000000807E2DDB1743F3487D6545F04F1C8476092FB912B013626AB5BCEB764257D88BBA64243B9F348DF7B41B8C814A995E00299913503456983FFB9178D3CD79EB6D55522418A8ABF65375872E55938AB99A84A0B5FC8A1ECC66A7C3766E7E0F80B7CE2C9225FC2DD683F4764244B72963BBB383F529DCF0C5D17740B8A2ADBE9208D40000000866616B652D736967' diff --git a/tests/test_message.py b/tests/test_message.py index 7bfd44d..3272477 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -21,7 +21,7 @@ Some unit tests for ssh protocol message blocks. """ import unittest -from paramiko.message import Message +from ssh.message import Message class MessageTest (unittest.TestCase): diff --git a/tests/test_packetizer.py b/tests/test_packetizer.py index d1eb584..1adb28a 100644 --- a/tests/test_packetizer.py +++ b/tests/test_packetizer.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -24,7 +24,7 @@ import unittest from loop import LoopSocket from Crypto.Cipher import AES from Crypto.Hash import SHA, HMAC -from paramiko import Message, Packetizer, util +from ssh import Message, Packetizer, util class PacketizerTest (unittest.TestCase): @@ -33,7 +33,7 @@ class PacketizerTest (unittest.TestCase): wsock = LoopSocket() rsock.link(wsock) p = Packetizer(wsock) - p.set_log(util.get_logger('paramiko.transport')) + p.set_log(util.get_logger('ssh.transport')) p.set_hexdump(True) cipher = AES.new('\x00' * 16, AES.MODE_CBC, '\x55' * 16) p.set_outbound_cipher(cipher, 16, SHA, 12, '\x1f' * 20) @@ -56,7 +56,7 @@ class PacketizerTest (unittest.TestCase): wsock = LoopSocket() rsock.link(wsock) p = Packetizer(rsock) - p.set_log(util.get_logger('paramiko.transport')) + p.set_log(util.get_logger('ssh.transport')) p.set_hexdump(True) cipher = AES.new('\x00' * 16, AES.MODE_CBC, '\x55' * 16) p.set_inbound_cipher(cipher, 16, SHA, 12, '\x1f' * 20) diff --git a/tests/test_pkey.py b/tests/test_pkey.py index 89d5580..5353b81 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -23,8 +23,8 @@ Some unit tests for public/private key objects. from binascii import hexlify, unhexlify import StringIO import unittest -from paramiko import RSAKey, DSSKey, Message, util -from paramiko.common import rng +from ssh import RSAKey, DSSKey, Message, util +from ssh.common import rng # from openssh's ssh-keygen PUB_RSA = 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA049W6geFpmsljTwfvI1UmKWWJPNFI74+vNKTk4dmzkQY2yAMs6FhlvhlI8ysU4oj71ZsRYMecHbBbxdN79+JRFVYTKaLqjwGENeTd+yv4q+V2PvZv3fLnzApI3l7EJCqhWwJUHJ1jAkZzqDx0tyOL4uoZpww3nmE0kb3y21tH4c=' diff --git a/tests/test_sftp.py b/tests/test_sftp.py index 2eadabc..afce853 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -33,10 +33,10 @@ import threading import time import unittest -import paramiko +import ssh from stub_sftp import StubServer, StubSFTPServer from loop import LoopSocket -from paramiko.sftp_attr import SFTPAttributes +from ssh.sftp_attr import SFTPAttributes ARTICLE = ''' Insulin sensitivity and liver insulin receptor structure in ducks from two @@ -82,12 +82,12 @@ class SFTPTest (unittest.TestCase): def init(hostname, username, keyfile, passwd): global sftp, tc - t = paramiko.Transport(hostname) + t = ssh.Transport(hostname) tc = t try: - key = paramiko.RSAKey.from_private_key_file(keyfile, passwd) - except paramiko.PasswordRequiredException: - sys.stderr.write('\n\nparamiko.RSAKey.from_private_key_file REQUIRES PASSWORD.\n') + key = ssh.RSAKey.from_private_key_file(keyfile, passwd) + except ssh.PasswordRequiredException: + sys.stderr.write('\n\nssh.RSAKey.from_private_key_file REQUIRES PASSWORD.\n') sys.stderr.write('You have two options:\n') sys.stderr.write('* Use the "-K" option to point to a different (non-password-protected)\n') sys.stderr.write(' private key file.\n') @@ -97,9 +97,9 @@ class SFTPTest (unittest.TestCase): sys.exit(1) try: t.connect(username=username, pkey=key) - except paramiko.SSHException: + except ssh.SSHException: t.close() - sys.stderr.write('\n\nparamiko.Transport.connect FAILED.\n') + sys.stderr.write('\n\nssh.Transport.connect FAILED.\n') sys.stderr.write('There are several possible reasons why it might fail so quickly:\n\n') sys.stderr.write('* The host to connect to (%s) is not a valid SSH server.\n' % hostname) sys.stderr.write(' (Use the "-H" option to change the host.)\n') @@ -109,7 +109,7 @@ class SFTPTest (unittest.TestCase): sys.stderr.write(' (Use the "-K" option to provide a different key file.)\n') sys.stderr.write('\n') sys.exit(1) - sftp = paramiko.SFTP.from_transport(t) + sftp = ssh.SFTP.from_transport(t) init = staticmethod(init) def init_loopback(): @@ -118,19 +118,19 @@ class SFTPTest (unittest.TestCase): socks = LoopSocket() sockc = LoopSocket() sockc.link(socks) - tc = paramiko.Transport(sockc) - ts = paramiko.Transport(socks) + tc = ssh.Transport(sockc) + ts = ssh.Transport(socks) - host_key = paramiko.RSAKey.from_private_key_file('tests/test_rsa.key') + host_key = ssh.RSAKey.from_private_key_file('tests/test_rsa.key') ts.add_server_key(host_key) event = threading.Event() server = StubServer() - ts.set_subsystem_handler('sftp', paramiko.SFTPServer, StubSFTPServer) + ts.set_subsystem_handler('sftp', ssh.SFTPServer, StubSFTPServer) ts.start_server(event, server) tc.connect(username='slowdive', password='pygmalion') event.wait(1.0) - sftp = paramiko.SFTP.from_transport(tc) + sftp = ssh.SFTP.from_transport(tc) init_loopback = staticmethod(init_loopback) def set_big_file_test(onoff): @@ -174,7 +174,7 @@ class SFTPTest (unittest.TestCase): self.fail('expected exception') except: pass - sftp = paramiko.SFTP.from_transport(tc) + sftp = ssh.SFTP.from_transport(tc) def test_3_write(self): """ @@ -699,7 +699,7 @@ class SFTPTest (unittest.TestCase): """ verify that seek does't affect writes during append. - does not work except through paramiko. :( openssh fails. + does not work except through ssh. :( openssh fails. """ f = sftp.open(FOLDER + '/append.txt', 'a') try: diff --git a/tests/test_sftp_big.py b/tests/test_sftp_big.py index a32a700..8c6fb31 100644 --- a/tests/test_sftp_big.py +++ b/tests/test_sftp_big.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -32,7 +32,7 @@ import threading import time import unittest -import paramiko +import ssh from stub_sftp import StubServer, StubSFTPServer from loop import LoopSocket from test_sftp import get_sftp @@ -242,7 +242,7 @@ class BigSFTPTest (unittest.TestCase): def test_6_lots_of_prefetching(self): """ prefetch a 1MB file a bunch of times, discarding the file object - without using it, to verify that paramiko doesn't get confused. + without using it, to verify that ssh doesn't get confused. """ sftp = get_sftp() kblob = (1024 * 'x') diff --git a/tests/test_transport.py b/tests/test_transport.py index cea4a1d..1c7d307 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -29,12 +29,12 @@ import threading import unittest import random -from paramiko import Transport, SecurityOptions, ServerInterface, RSAKey, DSSKey, \ +from ssh import Transport, SecurityOptions, ServerInterface, RSAKey, DSSKey, \ SSHException, BadAuthenticationType, InteractiveQuery, ChannelException -from paramiko import AUTH_FAILED, AUTH_PARTIALLY_SUCCESSFUL, AUTH_SUCCESSFUL -from paramiko import OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED -from paramiko.common import MSG_KEXINIT, MSG_CHANNEL_WINDOW_ADJUST -from paramiko.message import Message +from ssh import AUTH_FAILED, AUTH_PARTIALLY_SUCCESSFUL, AUTH_SUCCESSFUL +from ssh import OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED +from ssh.common import MSG_KEXINIT, MSG_CHANNEL_WINDOW_ADJUST +from ssh.message import Message from loop import LoopSocket diff --git a/tests/test_util.py b/tests/test_util.py index 256c3d7..6bd02cf 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,19 +1,19 @@ # Copyright (C) 2003-2009 Robey Pointer # -# This file is part of paramiko. +# This file is part of ssh. # -# Paramiko is free software; you can redistribute it and/or modify it under the +# 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# along with 'ssh'; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -25,7 +25,7 @@ import cStringIO import os import unittest from Crypto.Hash import SHA -import paramiko.util +import ssh.util test_config_file = """\ @@ -54,7 +54,7 @@ BGQ3GQ/Fc7SX6gkpXkwcZryoi4kNFhHu5LvHcZPdxXV1D+uTMfGS1eyd2Yz/DoNWXNAl8TI0cAsW\ # for test 1: -from paramiko import * +from ssh import * class UtilTest (unittest.TestCase): @@ -70,7 +70,7 @@ class UtilTest (unittest.TestCase): def test_1_import(self): """ - verify that all the classes can be imported from paramiko. + verify that all the classes can be imported from ssh. """ symbols = globals().keys() self.assertTrue('Transport' in symbols) @@ -109,7 +109,7 @@ class UtilTest (unittest.TestCase): def test_2_parse_config(self): global test_config_file f = cStringIO.StringIO(test_config_file) - config = paramiko.util.parse_ssh_config(f) + config = ssh.util.parse_ssh_config(f) self.assertEquals(config._config, [ {'identityfile': '~/.ssh/id_rsa', 'host': '*', 'user': 'robey', 'crazy': 'something dumb '}, @@ -119,16 +119,16 @@ class UtilTest (unittest.TestCase): def test_3_host_config(self): global test_config_file f = cStringIO.StringIO(test_config_file) - config = paramiko.util.parse_ssh_config(f) - c = paramiko.util.lookup_ssh_host_config('irc.danger.com', config) + config = ssh.util.parse_ssh_config(f) + c = ssh.util.lookup_ssh_host_config('irc.danger.com', config) self.assertEquals(c, {'identityfile': '~/.ssh/id_rsa', 'user': 'robey', 'crazy': 'something dumb '}) - c = paramiko.util.lookup_ssh_host_config('irc.example.com', config) + c = ssh.util.lookup_ssh_host_config('irc.example.com', config) self.assertEquals(c, {'identityfile': '~/.ssh/id_rsa', 'user': 'bjork', 'crazy': 'something dumb ', 'port': '3333'}) - c = paramiko.util.lookup_ssh_host_config('spoo.example.com', config) + c = ssh.util.lookup_ssh_host_config('spoo.example.com', config) self.assertEquals(c, {'identityfile': '~/.ssh/id_rsa', 'user': 'bjork', 'crazy': 'something else', 'port': '3333'}) def test_4_generate_key_bytes(self): - x = paramiko.util.generate_key_bytes(SHA, 'ABCDEFGH', 'This is my secret passphrase.', 64) + x = ssh.util.generate_key_bytes(SHA, 'ABCDEFGH', 'This is my secret passphrase.', 64) hex = ''.join(['%02x' % ord(c) for c in x]) self.assertEquals(hex, '9110e2f6793b69363e58173e9436b13a5a4b339005741d5c680e505f57d871347b4239f14fb5c46e857d5e100424873ba849ac699cea98d729e57b3e84378e8b') @@ -137,7 +137,7 @@ class UtilTest (unittest.TestCase): f.write(test_hosts_file) f.close() try: - hostdict = paramiko.util.load_host_keys('hostfile.temp') + hostdict = ssh.util.load_host_keys('hostfile.temp') self.assertEquals(2, len(hostdict)) self.assertEquals(1, len(hostdict.values()[0])) self.assertEquals(1, len(hostdict.values()[1])) @@ -147,7 +147,7 @@ class UtilTest (unittest.TestCase): os.unlink('hostfile.temp') def test_6_random(self): - from paramiko.common import rng + from ssh.common import rng # just verify that we can pull out 32 bytes and not get an exception. x = rng.read(32) self.assertEquals(len(x), 32)