473,554 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using paramiko problem? please help me


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 it necessery ? or may I
have to install another program?

2- I have entered server's Ip insted of hostname.Is it correct?

3- I have creat a user in server machine with a password to connect. Am I
right?

4- I use this code in clinet computer? May I need another code for server
computer?
hostname = "192.168.1. 4"
username = "test"
port = 22
password = '123456'

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

t = paramiko.Transp ort(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
authentication failed

what should I do?
please help me , I am new in paramiko.
--
View this message in context: http://www.nabble.com/using-paramiko...p20172937.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Oct 26 '08 #1
0 1364

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

Similar topics

0
2062
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 first. And the commands aren't that commplicated, they are usualy 'touch some-file' or 'cp some_file to /tmp/a'. Am I misunderstanding the paramiko's...
0
1077
by: Manpreet Singh | last post by:
Hi, I am using python2.4 for one of my application where I need to use paramiko for doing sftp. My application sftp to a server and get all the data needed locally. Now I have a utility names TRICKLE which does bandwidth throtlling. i.e. it control the data flow. Now if I use trickle with my python script it does not throttle the...
1
2401
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 scripts\sshlib\ssh.py", line 5, in <module> import paramiko File "C:\Python25\Lib\site-packages\paramiko\__init__.py", line 69, in <module> from transport...
7
1326
by: sa6113 | last post by:
I want to connect form a windows machine to a Linux one using SSH (I use Paramiko) and simply copy a file to Linux machine. Would you please help me how should I start? Is there any useful code? -- View this message in context: http://www.nabble.com/using-SSh-problem%21-tp19775680p19775680.html Sent from the Python - python-list mailing...
1
3855
by: sa6113 | last post by:
I use this code : import paramiko import socket hostname = "192.168.1.4" username = "test" port = 22 password = ''123456"
4
2693
by: sa6113 | last post by:
I couldn't find any good source for download Openssh on the net? Would you please introduce a URL for download that? Steve Holden-5 wrote: -- View this message in context: http://www.nabble.com/ssh-problem-using-paramiko--tp19857268p19875248.html Sent from the Python - python-list mailing list archive at Nabble.com.
0
2159
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) event = threading.Event() t.start_client(event) event.wait() if not t.is_active(): print 'SSH negotiation failed.'
0
1502
by: sa6113 | last post by:
which program I have to install for using paramiko for sftp between a two windows machine in local network?? I have installed freeSSHd for server machine but I got an Authentication failed erro when try to connect to server using this code : sock.connect((hostname, port)) t = paramiko.Transport(sock) event = threading.Event()...
0
2523
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 it necessery ? or may I have to install another program? 2- I have entered server's Ip insted of hostname.Is it correct? 3- I have creat a...
0
7612
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7536
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8053
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7576
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7895
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6163
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5443
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5165
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1147
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.