0
votes

My scenario is like, Initially i need to connect to a server through ssh command. once i connected to it enter into bash mode by typing 'bash' command then need to execute few more commands.

I have used Os Process sampler to do this and executed in docker container

Issue 1:) Getting "pseudo-terminal will not be allocated because stdin is not a terminal" error while doing ssh to that particular server. enter image description here

Issue 2:-) Failed to execute the command in bash mode enter image description here

Can you please help me on this

1

1 Answers

0
votes

If your "ssh" command assumes entering the password - you won't be able to achieve this because the password has to be supplied interactively.

If you need to execute a command (or several commmans) on the remove machine over SSH connection it's better to consider using SSH Command sampler (can be installed as a part of the SSH Protocol Support bundle using JMeter Plugins Manager

enter image description here

Once the plugin is installed you can use it for executing your commands over SSH channel:

enter image description here

More information: How to Run External Commands and Programs Locally and Remotely from JMeter