Not able to login using SSHLibrary

888 views
Skip to first unread message

himanshu mehrotra

unread,
Mar 27, 2019, 9:19:52 AM3/27/19
to robotframework-users
Hi,

I am using SSHLibrary to connect to my local machine for now and its giving me below error.

NoValidConnectionsError: [Errno None] Unable to connect to port 22 on 127.0.0.1 or ::1

Below is my test case.
*** Settings ***
Library           SSHLibrary

*** Test Cases ***
LoginTC
    Open Connection    localhost
    Login    username    password
    
Please let me know if i am missing anything here.

Hélio Guilherme

unread,
Mar 27, 2019, 11:11:44 AM3/27/19
to robotframework-users
So, you started a SSH server, created a "username" and defined their password as "password"?
Then, using a ssh client (putty, or operating system ssh) you did a first time login to create the keys, and accept host signature?

You can see the setup for testing in https://github.com/robotframework/SSHLibrary


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

himanshu mehrotra

unread,
Mar 27, 2019, 1:41:58 PM3/27/19
to heliox...@gmail.com, robotframework-users
So is this what i need to try first. I am using it first time.

Hélio Guilherme

unread,
Mar 27, 2019, 2:52:53 PM3/27/19
to robotframework-users
I am not sure if you can connect to localhost as you plan. Usually you have some remote machine with ssh server to connect.
You can setup a virtual machine and ssh into it.
There is also Vagrant, that downloads and creates a virtual machine, where the login is done by ssh.

himanshu mehrotra

unread,
Mar 29, 2019, 9:12:06 AM3/29/19
to Hélio Guilherme, robotframework-users
Thanks for your help...

I am able to connect to remote machine using the solution which you provided.

I have to install openssh on my windows machine and then placed the openssh-win64 extract in c:\programfules.Setup the environment variable(path system variable). Provided the path till openssh folder  (c:\programfiles\openSSH-win64) and then using windows power shell i installed the sshd and ssh-agent.

And then started the openssh server and did firewall setting to allow ssh connection.

All working fine. Able to get and put files on the remote machine using sshlibrary of robotframework.

Thanks
Himanshu
Reply all
Reply to author
Forward
0 new messages