473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

paramiko.SSHException : No existing session ???


I use this code :

hostname = "192.168.1.4"
username = "test"
port = 22
password = '123456'

# now connect
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect_ex((hostname, port))
except Exception, e:
print 'Connect failed: ' + str(e)
traceback.print_exc()
sys.exit(1)

t = paramiko.Transport(sock)
event = threading.Event()
t.start_client(event)
print "started client"
event.wait(15)

if not t.is_active():
print 'SSH negotiation failed.'
sys.exit(1)
else:
print "SSH negotiation sucessful"

print "doing authentication"
t.auth_password(username, password, event)
event.clear()
event.wait(20)

-----------------
the result is :
started client
ssh negotiation sucessful
donig authentication
.....
paramiko.SSHException : No existing session

-------------------
I am sure that the username and password exists properly.
what is the problem??
--
View this message in context: http://www.nabble.com/paramiko.SSHEx...p19822257.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Oct 5 '08 #1
2 7098
In message <ma**************************************@python.o rg>, sa6113
wrote:
print "doing authentication"
....
>
-----------------
the result is :
....
donig authentication
Interesting that these two don't match up. When you're supposed to copy and
paste, you should copy and paste, not type it in.
Oct 6 '08 #2

My problem is in password authentication.
Lawrence D'Oliveiro wrote:
>
In message <ma**************************************@python.o rg>, sa6113
wrote:
>print "doing authentication"
...
>>
-----------------
the result is :
...
>donig authentication

Interesting that these two don't match up. When you're supposed to copy
and
paste, you should copy and paste, not type it in.
--
http://mail.python.org/mailman/listinfo/python-list

--
View this message in context: http://www.nabble.com/paramiko.SSHEx...p19832282.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Oct 6 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: hanjar | last post by:
Hello, I'm using paramiko 0.9 to access one of my home machines and then execute a command. But with the script included below, the command gets executed on the 2nd to 6th go, never on the...
2
by: eight02645999 | last post by:
hi i downloaded paramiko and was trying to create private/pub key pairs from the docs, i use this method to create private key import paramiko k = paramiko.RSAKey.generate(1024)...
0
by: dmorilha | last post by:
Hello all, I developed a solution using paramiko and a similar Telnetlib class to access a several number of network devices in replacement of using Pexpect library and openssh client. It worked...
0
by: Tarun Kapoor | last post by:
I am using paramiko to do an SFTP file transfer... I was able to connect to the remote server using an SFTP client I have just to make sure that username and password are working.. But when i try...
1
by: Terry Reedy | last post by:
"Praveena B" <praveena_python@yahoo.comwrote in message news:808793.504.qm@web44809.mail.sp1.yahoo.com... when i used paramiko in python2.5 i got the error below. File "C:\praveena\python...
0
by: sa6113 | last post by:
I use this code : hostname = "192.168.1.4" username = "test" port = 22 password = '123456' # now connect try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1
by: sa6113 | last post by:
I use this code : import paramiko import socket hostname = "192.168.1.4" username = "test" port = 22 password = ''123456"
0
by: sa6113 | last post by:
I am using this code to connect to a windows machine using paramiko, I have installed sshd on the machine and it works properly: sock.connect((hostname, port)) t = paramiko.Transport(sock)...
0
by: sa6113 | last post by:
I want to connect to a Windows machine in my network , using ssh, I use paramiko but I have problem in authentication, would you please help me? 1- I have installed freeSSHD in server machine? Is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.