0

I am using robot framework and sshlibrary to test the ssh login to a remote server.

Here is how the code look like

open_connection_and_login

Open Connection  ${OBR_HOST},port=44000

Though robot is trying to make a connection but it is taking port 22 also Thats what logs says as below. Logging into '14.126.66.142,port=44000:22' as 'testk'.

Not sure from where it is picking :22 and appending it. Can any one please tell what i am doing wrong here ?

1 Answer 1

1

You don't need a comma, you have to use multiple spaces as a separator

Open Connection    ${OBR_HOST}    port=44000

Comma is not a separator in RobotFramework. Now, with comma, you're saying, that your server is ${OBR_HOST},port=44000 where ${OBR_HOST} is then replaced with the value of the variable. Note, that the "port=44000" is a part of ADDRESS in this case, not the port number. As port number the default value 22 is used.

That is why RobotFramework tries to log into "14.126.66.142,port=44000" on port 22.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.