472,368 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

authentication failed error occured while using paramiko

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?
Expand|Select|Wrap|Line Numbers
  1. hostname = "" 
  2. username = "test" 
  3. port = 22 
  4. password = '123456' 
  6. # now connect 
  7. try: 
  8.     sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 
  9.     sock.connect_ex((hostname, port)) 
  10. except Exception, e: 
  11.     print 'Connect failed: ' + str(e) 
  12.     traceback.print_exc() 
  13.     sys.exit(1) 
  15. t = paramiko.Transport(sock) 
  16. event = threading.Event() 
  17. t.start_client(event) 
  18. print "started client" 
  19. event.wait(15) 
  21. if not t.is_active(): 
  22.     print 'SSH negotiation failed.' 
  23.     sys.exit(1) 
  24. else: 
  25.     print "SSH negotiation sucessful" 
  27. print "doing authentication" 
  28. t.auth_password(username, password, event) 
  31. event.clear() 
  32. 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.
Oct 27 '08 #1
0 2411

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
by: Erez Shor | last post by:
Hi, I need to build and asp page which access a remote windows server's registry and create a registry key. In order for the ASP page to be able to access the registry on the remote server I need...
by: Thomas Scheiderich | last post by:
I am having a problem connecting to an Sql Server using Windows Authentication. I am using the following command: server=Raptor;uid=tfs;password=tol1ee;database=ABC;Network Library =dbmssocn ...
by: Steve M | last post by:
A few users today received the message "The trust relationship between this workstation and the primary domain failed" on their web browser while using an ASP.NET web app. The problem went away...
by: Nils Magnus Englund | last post by:
Hello, I am having trouble using Integrated Windows Authentication between our intranet server and our database server, both of which are on our local domain. Windows authentication works for...
by: rcp | last post by:
Hi all, I've read all posts from all existing threads and none of them worked to solve my problem, although its exactly the same. I'll try to explain my case and see if a kind soul could help me...
by: Benjamin Gufler | last post by:
Hello NG, I'm experiencing problems in configuring DB2 v9.1 on Linux (RedHat AS4) to use Kerberos authentication against an AD (W2K3 R2). IBM Network Authentication Service is installed and...
by: webrod | last post by:
Hi, I am trying to secure a WS using WSE 3.0 and kerberos. I used the "WSE 3.0 settings" from VS2005 with my own WS. I have a console application which try to access a WS. With the...
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)...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.