473,395 Members | 1,539 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,395 software developers and data experts.

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(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
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 1352

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...
0
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...
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...
7
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? ...
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"
4
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:...
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:
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...

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.