Git Product home page Git Product logo

exscript's People

Contributors

ak-eyes avatar aureliego avatar bigmars86 avatar cgill27 avatar clintonb avatar daanvdsanden avatar egroeper avatar flaurencin avatar hennadii-demchenko avatar int3rlop3r avatar job avatar knipknap avatar magahet avatar martinpakosch avatar maximumg avatar mpenning avatar mwallraf avatar ph20 avatar pheller avatar rsinner99 avatar salbertson avatar saveshodhan avatar timgates42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exscript's Issues

Unable to install on Linux Mint

Hello

I am unable to install exscript on Linux MInt. Here is the error message. I also tried on Ubuntu and received the same error.

Thanks

Mint knipknap-exscript-e77f216 # make install
mkdir -p /usr/local/python -c "import sys; from distutils.sysconfig import get_python_lib; print get_python_lib()[len(sys.prefix):]"
./version.sh
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
fatal: No names found, cannot describe anything.
No matching tag was found.
make: *** [install] Error 1

Mint knipknap-exscript-e77f216 # uname -r
3.0.0-12-generic

Using SSH1.5 and Exscript

Many of our routers use SSH 1.5 . Can I still use this module? When I use Protocol.SSH2 i get the error:

"paramiko.SSHException: Incompatible version (1.5 instead of 2.0)"

When I try to use Protocols.Protocol I get:

Traceback (most recent call last):
File "test.exscript.py", line 7, in
conn.connect(device) # Open the SSH connection
File "C:\Users\support\AppData\Roaming\Python\Python26\site-packages\exscript-
development-py2.6.egg\Exscript\protocols\Protocol.py", line 549, in connect
return self._connect_hook(self.host, port)
File "C:\Users\support\AppData\Roaming\Python\Python26\site-packages\exscript-
development-py2.6.egg\Exscript\protocols\Protocol.py", line 536, in _connect_hoo
k
raise NotImplementedError()
NotImplementedError

Is there support for SSH 1.5 ?

Thanks

Lou

Use SSH2 by default for no ssh://

Hi,

Is it possible to have exscript use SSH2 by default instead of having to put ssh:// in front of the ip address/hostname or in a text file if reading from a file?

SSH1 Usage for Huawei Routers

Hi,

I want to use the Python API of exscript to access Huawei routers in our company network. I saw in some old discussions that this has already been done. The problem I have now is that I cannot find a way to connect using SSH1, which is the only version supported by the Quidway Eudemon device (version 1.5 of ssh).

Can you give me some directions on how to get this working? I am also able and willing to do some necessary coding and testing if guided.

Regards,
Daniel

Brocade driver edit

The brocade driver seems to hang when enabling because of "User Name:"

src/Exscript/protocols/drivers/brocade.py
..-.. _user_re = [re.compile(r'[\r\n\r\n]Please Enter Login Name: $')]
..+.. _user_re = [re.compile(r'[\r\n\r\n]Please Enter Login Name: $|User Name:$')]

Can this be added please?

"make tests" error

"sudo make tests" results in 42 occurances of the following traceback and one failure:

Traceback (most recent call last):
File "/home/matt/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/matt/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/matt/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/local/lib/python2.7/dist-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/pkey.py", line 280, in _read_private_key_file
data = self._read_private_key(tag, f, password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/pkey.py", line 323, in _read_private_key
raise PasswordRequiredException('Private key file is encrypted')
PasswordRequiredException: Private key file is encrypted

FAIL: testSummarize (util.reportTest.reportTest)

Traceback (most recent call last):
File "/home/matt/exscript/tests/Exscript/util/reportTest.py", line 75, in testSummarize
self.assertEqual(summarize(self.logger), expected)
AssertionError: 'fake2: FakeError\nfake1: ok' != 'fake1: ok\nfake2: FakeError'


Ran 500 tests in 74.769s

FAILED (failures=1, errors=42)

Exscript needs a pypi entry (easy_install fails)

The platform is Python2.6 on WindowsXP, but that shouldn't matter... easy_install can't find exscript...

[mpenning@mpenning-t60 Python26]$ Scripts/easy_install.exe -U exscript
Searching for exscript
Reading http://pypi.python.org/simple/exscript/
Couldn't find index page for 'exscript' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for exscript
Best match: None
Traceback (most recent call last):
  File "C:\Python26\Scripts\easy_install-script.py", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 1712, in main
    with_ei_usage(lambda:
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 1700, in with_ei_usage
    return f()
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 1716, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "C:\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 434, in easy_install
    self.local_index
  File "C:\Python26\lib\site-packages\setuptools\package_index.py", line 475, in fetch_distribution
    return dist.clone(location=self.download(dist.location, tmpdir))
AttributeError: 'NoneType' object has no attribute 'clone'
[mpenning@mpenning-t60 Python26]$ Scripts/easy_install.exe -U Exscript
Searching for Exscript
Reading http://pypi.python.org/simple/Exscript/
Couldn't find index page for 'Exscript' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for Exscript
Best match: None
Traceback (most recent call last):
  File "C:\Python26\Scripts\easy_install-script.py", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 1712, in main
    with_ei_usage(lambda:
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 1700, in with_ei_usage
    return f()
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 1716, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "C:\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "C:\Python26\lib\site-packages\setuptools\command\easy_install.py", line 434, in easy_install
    self.local_index
  File "C:\Python26\lib\site-packages\setuptools\package_index.py", line 475, in fetch_distribution
    return dist.clone(location=self.download(dist.location, tmpdir))
AttributeError: 'NoneType' object has no attribute 'clone'
[mpenning@mpenning-t60 Python26]$

cisco ios: copy running-config tftp:

Please help me with this interactive command:

Python script:

conn.execute('copy running-config tftp:')
conn.execute('192.168.1.5')
conn.execute('test.conf')

TimeoutException: Timeout while waiting for response from device

Need assistance on get_hosts_from_file & get_accounts_from_file

What I am trying to do is to simply import a hosts & accounts file from the script and perform the operation to gather information. I have this working fine when I add acount information in manually. I need help with the specific format of the two files and then I was wandering How I can verify the list using the interpreter.

MY WORKING SCRIPT HAS

account1 = Account('user1', 'password1')
host1 = Host('ssh://1.1.1.1')
host1.set_account(account1)

account2 = Account('user2', 'password2')
host2 = Host('ssh://2.2.2.2')
host2.set_account(account2)

def do_something(job, host, conn):
conn.execute('show version')

start([account1 , account2], [host1 , host2], do_something, max_threads = 2)

**

When I use the above it works fine. Now I want to use accounts.cfg & myhosts.txt to import the users and hosts address'. I need to know what the exact format for accounts and hosts files are supposed to be.

**

SCRIPT TO I WANT TO TRY

from Exscript.util.start import start
from Exscript.util.file import get_hosts_from_file
from Exscript.util.file import get_accounts_from_file
from Exscript import Host, Account
import datetime

read input data

accounts = get_accounts_from_file('accounts.cfg')
hosts = get_hosts_from_file('myhosts.txt')

def do_something(job, host, conn):
conn.execute('show version')

start(accounts, hosts, do_something, max_threads = 2)

**

My 'accounts.cfg' looks like this

[account-pool]
user1 = password1==
user2 = password2==

What does the 'myhosts.txt' for host1 = Host('ssh://1.1.1.1')
and host2 = Host('ssh://2.2.2.2')?

If I want to print the list to see if the information is imported correctly, how would I do that?

from Exscript.util.start import start
from Exscript.util.file import get_hosts_from_file
from Exscript.util.file import get_accounts_from_file
from Exscript import Host, Account
accounts = get_accounts_from_file('accounts.cfg')
print type(accounts)
<type 'list'>
print accounts
[<Exscript.Account.Account object at 0x10ef56510>]

Thanks for the help

T.

Cisco IOS Enable doesnt work if "Service linenum" is configured.

Hello,

I am using following script to login to my routers.

! /usr/bin/python

import Exscript
import time
from Exscript.util.interact import read_login
from Exscript.protocols import SSH2
from Exscript.protocols.drivers import ios
from Exscript import Account

host = raw_input("Enter hostname/IP: ")

account = read_login()

print("Logging into the %s" %host)

conn = SSH2()
conn.connect(host)

conn.authenticate(account)

conn.send('enable\r')
conn.auto_app_authorize(account)

conn.execute('terminal length 0')
conn.execute('who')
print conn.response

conn.send('exit\r')
conn.close()

Problem is that this script works fine if "Service linenumber" is not configured, but if we enable this service enable doesnt work and fails when i try to go into exec mode, as per prompt difference we get following notification when we login to the router if service is enable.

So if service is enabled here is the login prompt:

test@test:~$ ssh cisco@testscript
Password:

IOU1 line 3

IOU1>en
Password:

IOU1#

and here is the prompt when "service linenumber" is not configured.

test@test:~$ ssh cisco@testscript
Password:

IOU1>en
Password:

IOU1#

Exscript doesn't work with Brocade

When using SSH to connect to a Brocade XMR/MLX, the script hangs on going from login to enable mode. I've tried creating a protocol engine for Brocade, but I failed to get it working properly.

Does anyone have a working protocol engine for Brocade routers/switches?

Kind regards,

Bart de Bruijn

Suppressing Exscript logs

What would be the easiest way to supress/disable the Exscript logger?

Sometimes when I'm doing custom logging, my logger will get filled with logs from Exscript. Is there a way to suppress that?

time out

hello Samuel ,

Thank you this great module that make our life easier .

Exscript.protocols.Exception.TimeoutException: Timeout while waiting for response from device
i get this exception above when i am running a command (show version ) on a cisco device that generates long output ,i thought about changing the timeout attribute , like this :
conn=SSH2(timeout=120)
but still i get the same error .
Is it better to change the buffer ? and how to achieve that .
this is my code :

from Exscript.util.interact import read_login
from Exscript.protocols import SSH2
import sys

USAGE='Usage : ./script hostname'

if len(sys.argv)==2:
hostname=sys.argv[1]
else:
print USAGE
sys.exit(1)

commands=['show flash',
'show version',]

account = read_login() # Prompt the user for his name and password
conn = SSH2() # We choose to use SSH2

conn.buffer='1024'

conn.connect(hostname) # Open the SSH connection
conn.login(account) # Authenticate on the remote host
print 'you are logged in'
for cmd in commands:
conn.execute(cmd) # Execute command
print conn.response

conn.send('exit\r')
print 'closing' # Send the "exit" command
conn.close() # Wait for the connection to close

easy_install: multiple dependency issues

Attempting to perform a standard easy_install of Exscript on linux fails... see the terminal log below. setuptools (and thus easy_install) requires a pypi entry for each package dependency... my first attempt at diagnosis reveals the following are missing entries on pypi (http://pypi.python.org/pypi):

  1. termconnect
  2. python-crypto (which is really the old name for this package... new maintainer calls it pycrypto, and it has a pypi entry)
  3. SpiffWorkQueue

SpiffSignal has a pypi entry; however, it still points to googlecode.

Since python-crypto is now on version 2.3, I'm not sure whether there are backwards-incompatible changes since he took over.

--- TERMLOG ---

[mpenning@Bucksnort ~]$ sudo easy_install Exscript
Searching for Exscript
Best match: Exscript 0.9.16
Processing Exscript-0.9.16-py2.5.egg
Exscript 0.9.16 is already the active version in easy-install.pth
Installing exscript script to /usr/bin

Using /usr/lib/python2.5/site-packages/Exscript-0.9.16-py2.5.egg
Processing dependencies for Exscript
Searching for termconnect
Reading http://pypi.python.org/simple/termconnect/
Couldn't find index page for 'termconnect' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for termconnect
Best match: None
Traceback (most recent call last):
  File "/usr/bin/easy_install", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 1712, in main
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 1716, in <lambda>
  File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 211, in run
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 446, in easy_install
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 481, in install_item
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 519, in process_distribution
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 563, in resolve
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 799, in best_match
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 811, in obtain
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 434, in easy_install
  File "build/bdist.linux-i686/egg/setuptools/package_index.py", line 475, in fetch_distribution
AttributeError: 'NoneType' object has no attribute 'clone'
[mpenning@Bucksnort ~]$

TimeoutException: Buffer error

This is my first time trying exscript, so I apologize if I am overlooking something. I wanted to utilize exscript to login to Cisco devices, etc. But I wanted to first test trying to login to unix/linux hosts. Following your API Tutorial (https://github.com/knipknap/exscript/wiki/Python-API-Tutorial) I came up with a simple way to test the functionality:

CODE BEGINS HERE

from Exscript.util.start import start
from Exscript import Account

def do_something(job, host, conn):
conn.execute('uname -a')

accounts = [Account('myuser', 'mypass')]
hosts = 'ssh://localhost'
start(accounts, hosts, do_something)

CODE ENDS HERE

When running the script I observe the following:

myuser@server scripts$ python test.py
Last login: Mon Oct 1 07:48:39 2012 from localhost.localdomain
kidd@skittles ~$ localhost error: Buffer: ''
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/Exscript/workqueue/Job.py", line 64, in run
self.function(self)
File "/usr/lib/python2.7/site-packages/Exscript/Queue.py", line 91, in _wrapped
result = func(job, host, conn, _args, *_kwargs)
File "/usr/lib/python2.7/site-packages/Exscript/util/decorator.py", line 103, in decorated
conn.login(flush = flush)
File "/usr/lib/python2.7/site-packages/Exscript/protocols/Protocol.py", line 594, in login
self.authenticate(account, flush = False)
File "/usr/lib/python2.7/site-packages/Exscript/protocols/Protocol.py", line 618, in authenticate
self.app_authenticate(app_account, flush = flush)
File "/usr/lib/python2.7/site-packages/Exscript/protocols/Protocol.py", line 786, in app_authenticate
self._app_authenticate(account, password, flush, bailout)
File "/usr/lib/python2.7/site-packages/Exscript/protocols/Protocol.py", line 690, in _app_authenticate
raise TimeoutException(msg)
TimeoutException: Buffer: ''

localhost finally failed.

It initially logs in, but the uname -a command is never executed. It just sits at the prompt. After about 20 seconds, I get a traceback and everything else. I'm not sure if I'm overlooking something basic, or if there is indeed something wrong. Any assistance would be appreciated. Thanks.

Windows: no attribute 'fork'

Apparently on windows fork is not supported:

Traceback (most recent call last):
File "exscript", line 516, in
SigIntWatcher()
File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\ut
il\sigint.py", line 44, in init
self.child = os.fork()
AttributeError: 'module' object has no attribute 'fork'

Is there some workaround?

Arista port ID's that include subports not compatible

I'm noticing that our Arista ports with subports do not jive with Exscript. Could you build in support for this. An example failure is included below.

sNJEQ01#configure terminal
sNJEQ01(config)#interface Ethernet50/1
sNJEQ01(config-if-Et50/1)#sNJEQ01 error: Timeout while waiting for response from device

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/Exscript/workqueue/Job.py", line 64, in run
self.function(self)
File "/usr/lib/python2.7/site-packages/Exscript/Queue.py", line 80, in _wrapped
result = func(job, host, conn, _args, *_kwargs)
File "/usr/lib/python2.7/site-packages/Exscript/util/decorator.py", line 110, in decorated
return function(job, host, conn, _args, *_kwargs)
File "/opt/autoconfint/lib/python2.7/site-packages/autoconfint/models.py", line 44, in execute_commands
conn.execute(sendcommand)
File "/usr/lib/python2.7/site-packages/Exscript/protocols/Protocol.py", line 888, in execute
return self.expect_prompt()
File "/usr/lib/python2.7/site-packages/Exscript/protocols/Protocol.py", line 987, in expect_prompt
result = self.expect(self.get_prompt())
File "/usr/lib/python2.7/site-packages/Exscript/protocols/Protocol.py", line 968, in expect
result = self._expect(prompt)
File "/usr/lib/python2.7/site-packages/Exscript/protocols/Protocol.py", line 944, in _expect
result = self._domatch(to_regexs(prompt), True)
File "/usr/lib/python2.7/site-packages/Exscript/protocols/SSH2.py", line 327, in _domatch
if not self._fill_buffer():
File "/usr/lib/python2.7/site-packages/Exscript/protocols/SSH2.py", line 303, in _fill_buffer
raise TimeoutException(error)
TimeoutException: Timeout while waiting for response from device

sNJEQ01 finally failed.

Fresh install. "make tests" failure

Hi Sam!
I'm trying to get your tool work for the very first time, but it failed(exceptions) with all by linux and cisco gear.
Now I installed it on another OS(SentOS) and I keep receiving those exceptions again, but now issuing "make tests" command just after fresh installation. It gives me something like this:

# make tests
cd tests/Exscript/; ./run_suite.py 1
.................../templates/builtinvars/pseudodev.py error: Buffer: ''
Traceback (most recent call last):
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/workqueue/Job.py", line                                                                64, in run
    self.function(self)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/Queue.py", line 80, in _                                                               wrapped
    result = func(job, host, conn, *args, **kwargs)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/util/decorator.py", line                                                                37, in decorated
    return function(*(inner_args + args), **kwargs)
  File "/root/exscript/exscript/tests/Exscript/TemplateTest.py", line 37, in dummy_cb
    conn.login(flush = True)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/protocols/Protocol.py",                                                                line 594, in login
    self.authenticate(account, flush = False)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/protocols/Protocol.py",                                                                line 618, in authenticate
    self.app_authenticate(app_account, flush = flush)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/protocols/Protocol.py",                                                                line 786, in app_authenticate
    self._app_authenticate(account, password, flush, bailout)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/protocols/Protocol.py",                                                                line 690, in _app_authenticate
    raise TimeoutException(msg)
TimeoutException: Buffer: ''

../templates/builtinvars/pseudodev.py finally failed.
../templates/stdlib.connection/pseudodev.py error: Buffer: ''
Traceback (most recent call last):
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/workqueue/Job.py", line                                                                64, in run
    self.function(self)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/Queue.py", line 80, in _                                                               wrapped
    result = func(job, host, conn, *args, **kwargs)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/util/decorator.py", line                                                                37, in decorated
    return function(*(inner_args + args), **kwargs)
  File "/root/exscript/exscript/tests/Exscript/TemplateTest.py", line 37, in dummy_cb
    conn.login(flush = True)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/protocols/Protocol.py",                                                                line 594, in login
    self.authenticate(account, flush = False)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/protocols/Protocol.py",                                                                line 618, in authenticate
    self.app_authenticate(app_account, flush = flush)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/protocols/Protocol.py",                                                                line 786, in app_authenticate
    self._app_authenticate(account, password, flush, bailout)
  File "/root/exscript/exscript/tests/Exscript/../../src/Exscript/protocols/Protocol.py",                                                                line 690, in _app_authenticate
    raise TimeoutException(msg)
TimeoutException: Buffer: ''

and so on and so forth.
Can someone help ? I really want to make this tool work!

Exscript not working on Fedora 19

I am getting the below error. I do have the pkg_resources.py in the usr/lib/python2.7 directory. I have checked around to see if anyone has had this issue and stackoverflow mentioned using PIP to install. This however has not worked either. Any ideas what is wrong?

Traceback (most recent call last):
File "/usr/local/bin/exscript", line 4, in
import pkg_resources
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2881, in
parse_requirements(requires), Environment()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 596, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Exscript==0.0.0

Quickstart doesn't work under Windows

OS: Windows 7, 64-bit

Attempting to import quickstart on Windows fails attempting to open /dev/null, when it should be targeting os.devnull.

ActivePython 2.6.6.18 (ActiveState Software Inc.) based on
Python 2.6.6 (r266:84292, Jan  7 2011, 13:16:36) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from Exscript.util.start import quickstart
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26VE\lib\site-packages\Exscript\__init__.py", line 26, in <module>
    from Exscript.Queue       import Queue
  File "C:\Python26VE\lib\site-packages\Exscript\Queue.py", line 24, in <module>
    from Exscript.CustomAction import CustomAction
  File "C:\Python26VE\lib\site-packages\Exscript\CustomAction.py", line 18, in <module>
    from Exscript.protocols.Exception   import LoginFailure
  File "C:\Python26VE\lib\site-packages\Exscript\protocols\__init__.py", line 19, in <module>
    from Exscript.protocols.SSH2     import SSH2
  File "C:\Python26VE\lib\site-packages\Exscript\protocols\SSH2.py", line 39, in <module>
    util.log_to_file('/dev/null')
  File "C:\Python26VE\lib\site-packages\paramiko\util.py", line 255, in log_to_file
    f = open(filename, 'w')
IOError: [Errno 2] No such file or directory: '/dev/null'
>>>

Fix: Change line 39 of Exscript/protocols/SSH2.py to reference os.devnull instead of '/dev/null'.

Unable to run script on Nexus Device

I am trying to run the following script on Nexus device:

from Exscript.protocols import SSH2
from Exscript import Host, Account

account = Account('admin','admin')
conn = SSH2()
conn.connect('192.168.172.219')
conn.login(account)

conn.execute('show ip route')
print conn.response
conn.send('exit\r')
conn.close()

I keep getting the following error:

Traceback (most recent call last):
File "C:\Users\jsanchez\PycharmProjects\Cisco Test\Cisco-Test.py", line 8, in

conn.login(account)
File "C:\Python27\lib\site-packages\Exscript\protocols\Protocol.py", line 594,
in login
self.authenticate(account, flush = False)
File "C:\Python27\lib\site-packages\Exscript\protocols\Protocol.py", line 618,
in authenticate
self.app_authenticate(app_account, flush = flush)
File "C:\Python27\lib\site-packages\Exscript\protocols\Protocol.py", line 786,
in app_authenticate
self._app_authenticate(account, password, flush, bailout)
File "C:\Python27\lib\site-packages\Exscript\protocols\Protocol.py", line 690,
in _app_authenticate
raise TimeoutException(msg)
Exscript.protocols.Exception.TimeoutException: Buffer: ''

Any ideas? Thanks!

Error trying to build exscript

Hello

I am getting the following error when trying to build exscript on my Raspberry Pi-

pi@raspberrypi ~/exscript/exscript-master $ sudo make install
mkdir -p /usr/local/python -c "import sys; from distutils.sysconfig import get_python_lib; print get_python_lib()[len(sys.prefix):]"
./version.sh
Not a git repository.
make: *** [install] Error 1

Could you help?

Thanks,
/Baktha

running simple.py on ubuntu12.04 and failing?

We have been using excript for our network appliances without any issues. I'm looking to extend it to our linux machines as well (move away from SSH paramiko). I downloaded exscript on Ubuntu 12.04 LTS running on python 2.7.3, installed python-crypto and was not able to run the simple.py.

Do i have to make any changes to support my support?

morgany@morgany-VirtualBox1:~/exscript/demos/simple$ python simple.py
Please enter your user name [morgany]:
Please enter your password:
Traceback (most recent call last):
File "simple.py", line 8, in
conn.login(account)
File "/usr/local/lib/python2.7/dist-packages/Exscript-DEVELOPMENT-py2.7.egg/Exscript/protocols/Protocol.py", line 594, in login
self.authenticate(account, flush = False)
File "/usr/local/lib/python2.7/dist-packages/Exscript-DEVELOPMENT-py2.7.egg/Exscript/protocols/Protocol.py", line 618, in authenticate
self.app_authenticate(app_account, flush = flush)
File "/usr/local/lib/python2.7/dist-packages/Exscript-DEVELOPMENT-py2.7.egg/Exscript/protocols/Protocol.py", line 786, in app_authenticate
self._app_authenticate(account, password, flush, bailout)
File "/usr/local/lib/python2.7/dist-packages/Exscript-DEVELOPMENT-py2.7.egg/Exscript/protocols/Protocol.py", line 690, in _app_authenticate
raise TimeoutException(msg)
Exscript.protocols.Exception.TimeoutException: Buffer: ''

ssh DSA key not working

Hi,

I tried to execute a script over ssh with a DSA public key. Reading the error correct the script expects a RSA file.
Is there a way to use DSA key files?
I'm using the 2.1 tag of exscript.

Here is the error i get.

exscript -p ssh2 --ssh-key=ssh-key test hostname
Please enter your user name [root]:
Please enter your password:
Reading key from ssh-key
hostname error: not a valid RSA private key file
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/CustomAction.py", line 112, in execute
self._call_function(conn)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/HostAction.py", line 62, in _call_function
return self.function(conn)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/util/decorator.py", line 91, in decorated
result = function(conn, _args, *_kwargs)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/util/decorator.py", line 117, in decorated
conn.login(flush = flush)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/Connection.py", line 183, in login
self.protocol.login(account, flush = flush)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/Protocol.py", line 582, in login
self.authenticate(account, flush = False)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/Protocol.py", line 605, in authenticate
self.protocol_authenticate(account)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/Protocol.py", line 634, in protocol_authenticate
self._protocol_authenticate_by_key(user, key)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/SSH2.py", line 260, in _protocol_authenticate_by_key
self._paramiko_auth_key(user, keys, key.get_password())
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/SSH2.py", line 192, in _paramiko_auth_key
raise saved_exception
SSHException: not a valid RSA private key file

Regards
mg

No module named Interact / No module named Protocols

I am new to Exscript and Python scripting in general. While going through the documentation on this site I ran into an issue with this: https://github.com/knipknap/exscript/blob/master/demos/simple/simple.py

When I run the script from that page I get this error:

Traceback (most recent call last):
File "<pyshell#18>", line 1, in
from Exscript.util.interact import read_login
ImportError: No module named interact

If I try to run from Exscript.protocols import SSH2 from the IDLE interpreter I get this error:

Traceback (most recent call last):
File "<pyshell#19>", line 1, in
from Exscript.protocols import SSH2
ImportError: No module named protocols

I installed Exscript using ActivePython. Can anyone help me resolve this issue?

Thank you

Lou

No module named "lxml"

Successfullly installed paramico, PyCrypto and exscript, but encountered a problem: ImportError: No module named lxml

Is it an additional dependency?

A potential code/documentation mismatch issue

In file https://github.com/knipknap/exscript/blob/master/src/Exscript/stdlib/file.py

def chmod(scope, filename, mode):
    """
    Changes the permissions of the given file (or list of files)
    to the given mode. You probably want to use an octal representation
    for the integer, e.g. "chmod(myfile, 0644)".

    @type filename: string
    @param filename: A filename.
    @type mode: int
    @param mode: The access permissions.
    """
    for file in filename:
        os.chmod(file, mode[0])
    return True

If mode is an integer as per the method docstring, then we cannot access via index for an int variable. Additionally, the scope parameter is not used inside this function.

SSH/Telnet connections fail on Windows

When I try to run a simple script against a host, as follows:

from Exscript import Host, Account
from Exscript.util.start import quickstart

host = Host( 'telnet://10.0.0.1' )

def do_configure( conn ):
    print "Configuring..."
    conn.send( 'exit' )
    print "Complete."

quickstart( [ host ], do_configure, max_threads=1 )

The connection attempt fails with this exception:

Traceback (most recent call last):
  File "C:\Python26\Lib\threading.py", line 534, in __bootstrap_inner
    self.run()
  File "C:\Python26VE\lib\site-packages\Exscript\AccountManager.py", line 72, in run
    r, w, x = select.select([self.to_child], [], [], .2)
error: (10038, 'An operation was attempted on something that is not a socket')

10.0.0.1 error: 'module' object has no attribute 'ctermid'
Traceback (most recent call last):
  File "C:\Python26VE\lib\site-packages\Exscript\CustomAction.py", line 119, in execute
    self._call_function(conn)
  File "C:\Python26VE\lib\site-packages\Exscript\HostAction.py", line 76, in _call_function
    return self.function(conn)
  File "C:\Python26VE\lib\site-packages\Exscript\util\decorator.py", line 90, in decorated
    conn.connect()
  File "C:\Python26VE\lib\site-packages\Exscript\Connection.py", line 118, in connect
    self.get_host().get_tcp_port()):
  File "C:\Python26VE\lib\site-packages\Exscript\protocols\Protocol.py", line 549, in connect
    return self._connect_hook(self.host, port)
  File "C:\Python26VE\lib\site-packages\Exscript\protocols\Telnet.py", line 41, in _connect_hook
    rows, cols = get_terminal_size()
  File "C:\Python26VE\lib\site-packages\Exscript\util\tty.py", line 78, in get_terminal_size
    fd = os.open(os.ctermid(), os.O_RDONLY)
AttributeError: 'module' object has no attribute 'ctermid'

10.0.0.1 finally failed.

The problem is obvious: os.ctermid is only supported on Unix; less than obvious is the correct behavior in the absense of os.ctermid. Currently tty.get_terminal_size is catching OSError in case ctermid fails, but what is returned is AttributeError, because ctermid isn't present. Can we just add another except clause for AttributeError, the same as OSError?

Latest Exscript on Windows raises TimeoutException when authenticating

I'm using Exscript v2.1-405 installed via 'easy_install [master/tarball]' with Python 2.7 on Windows 8.1 x86.

I have several utilities I would like to port over to Windows for the rest of my team to use. I'm able to import all my required modules, but was getting the Exception shown below.

I isolated it to authenticating to host with this simple script:

import Exscript
from Exscript.util.interact import read_login

account = read_login()
conn = Exscript.protocols.SSH2()
host = 'testhost'

conn.connect(host)
conn.login(account)

Which raises:

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\workqueue\Job.py", line 64, in run
    self.function(self)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\Queue.py", line 91, in _wrapped
    result = func(job, host, conn, *args, **kwargs)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\util\decorator.py", line 103, in decorated
    conn.login(flush = flush)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\protocols\Protocol.py", line 594, in login
    self.authenticate(account, flush = False)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\protocols\Protocol.py", line 618, in authenticate
    self.app_authenticate(app_account, flush = flush)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\protocols\Protocol.py", line 786, in app_authenticate
    self._app_authenticate(account, password, flush, bailout)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\protocols\Protocol.py", line 690, in _app_authenticate
    raise TimeoutException(msg)
TimeoutException: Buffer: ''

I've seen other people at least get further than logging into the device in Windows, so I'm unsure where my problem lies. Also doesn't help that I'm not the most Windows fluent person either.

I would really appreciate any help.

Brocade and Telnet login

For Brocade MLX I noticed that the telnet failure reads: User login failure.

This was not picked up by the general nor the Brocade driver.

I did a small edit to the general driver as I can imagine the word 'failure' being used more often.

in src/Exscript/protocols/drivers/driver.py
_login_fail = [r'bad secrets',
r'denied',
r'invalid',
r'too short',
r'incorrect',
r'connection timed out',
r'failed',
+++ r'failure']

Authenticationless SSH sessions

I have some devices that do SSH without the authentication. They essentially emulate telnet over a SSH connection. There does not appear to be a way to connect to these via exscript.

$ ssh wc-r8-c33-1 -l thisaccountdoesnotexist


Copyright (c) 2005 - 2009 Enterasys, Inc. All rights reserved.



Username: 

When I try to use exscript I get

wc-r8-c33-1 error: Bad authentication type (allowed_types=['none'])
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/Exscript/HostAction.py", line 103, in execute
    self.function(conn)
  File "/usr/lib/python2.6/site-packages/Exscript/util/decorator.py", line 91, in decorated
    return function(conn, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/Exscript/util/decorator.py", line 115, in decorated
    conn.authenticate(wait = True)
  File "/usr/lib/python2.6/site-packages/Exscript/Connection.py", line 230, in authenticate
    key_file = key_file)
  File "/usr/lib/python2.6/site-packages/Exscript/protocols/Transport.py", line 299, in authenticate
    self._authenticate_hook(user, password, **kwargs)
  File "/usr/lib/python2.6/site-packages/Exscript/protocols/SSH2.py", line 66, in _authenticate_hook
    timeout      = self.timeout)
  File "/usr/lib/python2.6/site-packages/Exscript/external/paramiko/client.py", line 322, in connect
    self._auth(username, password, pkey, key_filenames, allow_agent, look_for_keys)
  File "/usr/lib/python2.6/site-packages/Exscript/external/paramiko/client.py", line 476, in _auth
    raise saved_exception
BadAuthenticationType: Bad authentication type (allowed_types=['none'])

wc-r8-c33-1 finally failed.

When I specify -ni on the command line, I get

wc-r8-c33-1 error: 'NoneType' object has no attribute 'sendall'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/Exscript/HostAction.py", line 103, in execute
self.function(conn)
  File "/usr/lib/python2.6/site-packages/Exscript/util/decorator.py", line 34, in decorated
    return function(conn, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/Exscript/util/template.py", line 119, in eval
return _run(conn, None, string, parser_args, **kwargs)
  File "/usr/lib/python2.6/site-packages/Exscript/util/template.py", line 56, in _run
    return compiled.execute()
  File "/usr/lib/python2.6/site-packages/Exscript/interpreter/Program.py", line 39, in execute
    self.value()
  File "/usr/lib/python2.6/site-packages/Exscript/interpreter/Scope.py", line 102, in value
    result = child.value()
  File "/usr/lib/python2.6/site-packages/Exscript/interpreter/Scope.py", line 102, in value
    result = child.value()
  File "/usr/lib/python2.6/site-packages/Exscript/interpreter/Execute.py", line 51, in value
    conn.execute(command)
  File "/usr/lib/python2.6/site-packages/Exscript/protocols/SSH2.py", line 119, in execute
    self.shell.sendall(command + '\r')
AttributeError: 'NoneType' object has no attribute 'sendall'

Being prompted for login/password

Hi,

I have run into a few small issues with exscript. First, when i connect to a device I am prompted for a username and password, I do not have to enter anything valid, just hit any key twice for the script to continue. Is there a way to prevent this from happening?

Second - Is there a way to make it so only the output of a command is shown and not the prompt on the remote device and other stuff from when you login like a banner?

Thanks

Does not work on MAC or CentOS6.5

Hi,

I installed master brach code on macos and CentOS6.5, got the same error with simple demo code:

conn.login(account)
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Exscript-DEVELOPMENT-py2.7.egg/Exscript/protocols/Protocol.py", line 606, in login
self.authenticate(account, flush = False)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Exscript-DEVELOPMENT-py2.7.egg/Exscript/protocols/Protocol.py", line 629, in authenticate
self.protocol_authenticate(account)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Exscript-DEVELOPMENT-py2.7.egg/Exscript/protocols/Protocol.py", line 655, in protocol_authenticate
self._protocol_authenticate(user, password)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Exscript-DEVELOPMENT-py2.7.egg/Exscript/protocols/SSH2.py", line 266, in _protocol_authenticate
self._paramiko_auth(user, password)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Exscript-DEVELOPMENT-py2.7.egg/Exscript/protocols/SSH2.py", line 245, in _paramiko_auth
raise LoginFailure('Login failed: ' + str(last_exception))
Exscript.protocols.Exception.LoginFailure: Login failed: ('Bad authentication type', [u'publickey', u'keyboard-interactive', u'hostbased']) (allowed_types=[u'publickey', u'keyboard-interactive', u'hostbased'])

Weird error with older device

Error:

Traceback (most recent call last):
  File "exscript test.py", line 17, in <module>
    conn.login(account)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\protocols\Protocol.py", line 594, in login

    self.authenticate(account, flush = False)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\protocols\Protocol.py", line 617, in authe
nticate
    self.protocol_authenticate(account)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\protocols\Protocol.py", line 643, in proto
col_authenticate
    self._protocol_authenticate(user, password)
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\protocols\SSH2.py", line 267, in _protocol
_authenticate
    self._paramiko_shell()
  File "C:\Python27\lib\site-packages\exscript-development-py2.7.egg\Exscript\protocols\SSH2.py", line 256, in _paramiko
_shell
    raise LoginFailure('Failed to open shell: ' + str(e))
Exscript.protocols.Exception.LoginFailure: Failed to open shell: Channel closed.

Code:

from Exscript.util.interact import read_login
from Exscript.protocols import SSH2
import time
import re

account = read_login()
host = raw_input("Please type the hostname: ")

commandfile = open('commands.txt')
p = re.compile(ur'(.+?)\n')
active = commandfile.read()
commands = re.findall(p, active)
commandfile.close()

conn = SSH2()
conn.connect(str(host))
conn.login(account)

for cmd in commands:
    print "current command: ",cmd
    conn.execute(str(cmd))
    print "Response was:", conn.response
    time.sleep(1)



conn.send('exit\r')
conn.close()

It works fine with other hosts, and the host I am trying it against works with putty when forced to SSH v1 and v2

execute commands on IOS priviliged mode

Hello Manuel ,

what is a simple way to execute commands from priviliged mode ,or how to switch to priviliged mode using the Python API ,this is my code below :

from Exscript.protocols import SSH2
from Exscript import Account

device='192.168.69.1'
name='test'
password='test'
enable_password='test'

conn=SSH2()
account=Account(name=name,password=password)
conn.connect(device,logfile='mylog.log')
conn.login(account)

conn.execute('enable')
conn.send(enable_password)
conn.execute('write memory')
conn.send('exit\r')
conn.close(force)

master branch instalation problem on ubuntu 10.10

Hello,

Just tried to install exscript in my ubuntu 10.10 and got an error when running 'exscript' from master branch. I was able to run it checking v2.0 tag out.

When installing from master branch:

".... (output of 'sudo make install') ....
Installed /usr/local/lib/python/site-packages/Exscript-v2.0.373_g27951ca-py2.6.egg
Processing dependencies for Exscript==v2.0.373-g27951ca
Finished processing dependencies for Exscript==v2.0.373-g27951ca
./version.sh --reset
Version is DEVELOPMENT
Os arquivos /tmp/fileL6rcPh e src/Exscript/version.py sรฃo diferentes  
     (^^ that's portuguese, it says they are different)
Version file updated.


morales@espinosa:~/src/exscript$ exscript
Traceback (most recent call last):
 File "/usr/local/bin/exscript", line 4, in <module>
  import pkg_resources
 File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2671, in <module>
  working_set.require(__requires__)
 File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 654, in require
   needed = self.resolve(parse_requirements(requirements))
 File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 552, in resolve
   raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Exscript==v2.0.373-g27951ca"

Seems to me that exscript should be installed to /usr/local/lib/python2.6 instead of /usr/local/lib/python. Tried to move it manually, but it the same happens. Maybe I'm lacking some python distutils voodo.

Then I tried installing v2.0 with git checkout v2.0 and the instructions at
http://groups.google.com/group/exscript/browse_thread/thread/b7195eec3a9ab5be?pli=1

It worked. In this case "sudo make install" put the files in
/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/

So it gives the impression that some distutils-related "where-should-i-put-this?" code was fine in v2.0 and is broken now.

I'm glad to help with any testing/tweaking necessary.

logdir

Traceback (most recent call last):
File "./exscript-cisco.py", line 43, in
start(accounts, hosts, do_something, max_threads = connection_max_threads, logdir = '/tmp/cisco-logs')
File "/usr/local/lib/python2.7/dist-packages/Exscript/util/start.py", line 81, in start
run(users, hosts, autologin()(func), **kwargs)
File "/usr/local/lib/python2.7/dist-packages/Exscript/util/start.py", line 48, in run
queue = Queue(**kwargs)
TypeError: init() got an unexpected keyword argument 'logdir'

exscript appears to install, but isn't actually there.

I'm attempting to install exscript on windows 7, but having zero luck. I downloaded the latest tar.gz file for python 2.7 and went from there:

c:\Python27\Scripts>easy_install C:\Users\htregillus\Documents\Python\knipknap-exscript-v2.1-385-gc8e96c6.tar.gz
Processing knipknap-exscript-v2.1-385-gc8e96c6.tar.gz
Writing c:\users\htregi~1\appdata\local\temp\easy_install-xtpiix\knipknap-exscript-c8e96c6\setup.cfg
Running knipknap-exscript-c8e96c6\setup.py -q bdist_egg --dist-dir c:\users\htregi~1\appdata\local\temp\easy_install-xtpiix\knipknap-exscript-c8e96c6\egg-dist-tmp-wkhb8m
zip_safe flag not set; analyzing archive contents...
Exscriptd.Service: module references __file__
Exscriptd.config.BaseConfig: module references __file__
exscript development is already the active version in easy-install.pth
Installing exclaim script to C:\Python27\Scripts
Installing exscript script to C:\Python27\Scripts
Installing exscriptd script to C:\Python27\Scripts
Installing exscriptd-config script to C:\Python27\Scripts

Installed c:\python27\lib\site-packages\exscript-development-py2.7.egg
Processing dependencies for exscript==development
Finished processing dependencies for exscript==development

Then ran exscript --version to figure out if it had installed successfully, only to find out it had obviously not installed:

>>> exscript --version

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    exscript --version
NameError: name 'exscript' is not defined

Looking through the output of easy_install, I found c:\python27\lib\site-packages\ where I have pycrypto, paramiko, and setuptools, as well as the exscript folder - all of which seem to be complete with everything :\ but python doesn't see exscript as installed.

Any last ideas? I would use plain old paramiko for my ssh needs, but it closes the ssh connection after every line entered, which makes it difficult/impossible to use with cisco gear.

Manually set exscript timeout after establishing a connection

I'm trying to figure out whether you can manually specify a timeout before an exscript conn.execute()... The online docs seem to indicate that this should be possible, but this bombs with an error when I try it...

import sys

from Exscript.util.interact import read_login
from Exscript.protocols import SSH2
from Exscript.protocols.drivers import ios, shell, generic

account = read_login()
conn = SSH2(debug=0, auto_verify=False, stdout=sys.stdout, timeout=15)
conn.buffer = 2048
conn.set_driver('ios')
conn.connect('172.16.1.1')
conn.login(account)
conn.execute('term pager 0')
conn.set_timeout(5)     ### <------ Required functionality here
conn.execute('show ver')

When I run that script, I get this error while running the conn.set_timeout(5) line:
AttributeError: 'int' object has no attribute 'tail'

Is this a bug, or is this even supposed to be supported?

exscript does not recognize brocade configure prompt

Encountered on a brocade NetIron CES

When trying to use exscript to configure an interface it fails when entering the interface configure mode.

telnet@brocade-ces#configure terminal
telnet@brocade-ces(config)#interface eth 1/1
telnet@brocade-ces(config-if-e1000-1/1)#brocade-ces error: Error while waiting for response from device

It looks like the script does not recognize the interface configure prompt.

How to disable the auto enable feature?

Hi

Thanks for exscript this is pretty good for automation.

Meanwhile I try to dump the configuration of a brocade switch. My user has administrator privileges thus I do not need to run enable. I cannot find a way to disable the auto enable feature:

All jobs enqueued.
Waiting for the queue to finish.
SSH@sw1-p1#enable
Invalid input -> enable
Type ? for a list
SSH@sw1-p1#sw1-p1.example.com error: Login failed
Traceback (most recent call last):

This works fine if I disable the call self.auto_app_authorize(app_account, flush = flush) in Protocol.py (line 597).

This is not a fine solution since it implies modifying the upstream.

Thanks for your support.

Cheers.

Can't configure banner in IOS (Cisco) or EOS (Arista) using conn.execute or conn.send

Hi,

We have a massdeploy.py script that basically reads a file with switch names, a file with IOS or EOS commands, then executes the commands on the switches. We basically configured the following:

from Exscript.util.interact import read_login
from Exscript.protocols import SSH2
from Exscript import Queue, Logger
from Exscript.util.log import log_to
from Exscript.util.decorator import autologin
from Exscript.util.file import get_hosts_from_file, get_accounts_from_file
from Exscript.util.report import status, summarize

def execute_commands(job, host, conn):
for sendcommand in commandlist:
conn.execute(sendcommand)

queue = Queue(verbose = verbosity, max_threads = 1)
queue.add_account(accounts)
queue.run(hosts, execute_commands)
queue.shutdown()

I left the rest of the script out. Basically the commandlist is the IOS or EOS commands in the file, line by line. For example if the commandlist had this in it then it would work without a problem:

conf t
interface "bla"
description "whatever"
end

However, I'm trying to configure this on an EOS device and is not working:

banner motd (add ^ or ^C in case of IOS)


  •   THIS SYSTEM IS FOR THE USE OF AUTHORISED USERS ONLY!           *
    

    EOF (replace with ^ in case of IOS)
    end

In both IOS and EOS cases I get this, which is my problem and where our script fails:
In EOS case:

banner motd

Enter TEXT message. Type 'EOF' on its own line to end.
Or in IOS case:

banner motd ^

Enter TEXT message. End with the character '^'.

This is because conn.execute waits for an answer from the switch that the command was complete, and in this case the banner motd command waiting for text input. I don't want to update every switch manually and I tried to change it to conn.send, which doesn't wait for an answer, but that did nothing.

Does anyone know how to work around this problem with a tested and proven to work script/work around?

Thank you,

Conn.response is not changing

Or it is stuck on the last response.
Even after not timing out on an expect or execute, it does not change. Maybe I should be matching on the returned tuple from expect?

I am doing my own threading. Maybe that will mess with how the code works?
Maybe I need to thread lock on the connecting part?

I don't know why though. I can't figure it out for the life of me.

Install - issue

I have all the prerequisites loaded, any help resolving would be greatly appreciated.

[root@gcox-serv02 exscript]# uname -a
Linux gcox-serv02.localdomain 2.6.35.13-91.fc14.i686.PAE #1 SMP Tue May 3 13:29:55 UTC 2011 i686 i686 i386 GNU/Linux
[root@gcox-serv02 exscript]#

[root@gcox-serv02 exscript]# exscript --help
Traceback (most recent call last):
File "/usr/local/bin/exscript", line 4, in
import pkg_resources
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2707, in
working_set.require(requires)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Exscript==v2.1.334-g76d2486
[root@gcox-serv02 exscript]#

[root@gcox-serv02 exscript]# make tests
cd tests/Exscript/; ./run_suite.py 1

.....................................................................................................................................................................................................................................................................................................................................................................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE......................F............................................................................

ERROR: testAddMonitor (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testAppAuthenticate (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testAppAuthorize (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testAuthenticate (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testAutoAppAuthorize (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testAutoinit (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testCancelExpect (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testClose (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testConnect (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testConstructor (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testCopy (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testDeepcopy (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testExecute (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testExpect (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testExpectPrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGetBuffer (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGetDriver (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGetErrorPrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGetHost (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGetLoginErrorPrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGetPasswordPrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGetPrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGetTimeout (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGetUsernamePrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testGuessOs (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testInteract (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testIsAppAuthenticated (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testIsAppAuthorized (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testIsDummy (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testIsProtocolAuthenticated (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testLogin (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testPrompts (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testProtocolAuthenticate (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testSend (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testSetDriver (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testSetErrorPrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testSetLoginErrorPrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testSetPasswordPrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testSetPrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testSetTimeout (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testSetUsernamePrompt (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

ERROR: testWaitfor (protocols.SSH2Test.SSH2Test)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/ProtocolTest.py", line 30, in setUp
self.createDaemon()
File "/home/gcox/Downloads/exscript/tests/Exscript/protocols/SSH2Test.py", line 12, in createDaemon
self.daemon = SSHd(self.hostname, self.port, self.device)
File "/home/gcox/Downloads/exscript/tests/Exscript/../../src/Exscript/servers/SSHd.py", line 99, in init
self.host_key = paramiko.RSAKey(filename = keyfile)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 51, in init
self._from_private_key_file(filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/lib/python2.7/site-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/root/.ssh/id_rsa'

FAIL: testSummarize (util.reportTest.reportTest)

Traceback (most recent call last):
File "/home/gcox/Downloads/exscript/tests/Exscript/util/reportTest.py", line 75, in testSummarize
self.assertEqual(summarize(self.logger), expected)
AssertionError: 'fake2: FakeError\nfake1: ok' != 'fake1: ok\nfake2: FakeError'


Ran 498 tests in 70.210s

FAILED (failures=1, errors=42)
[root@gcox-serv02 exscript]#

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.