Hi ,
Right now i am using Putty to login to the server with my credentials. I am passing the command in shell. I want to ping the server directly through UiPath and the commands to get the components table back in as response.
Can please someone help me with this.
Please check
Cheers
Hi @subham.dey
Please refer the below thread which is having the direct activity
HI,
How about using System.Net.NetworkInformation.Ping class?
FYI
Regards,
Hi @Anil_G ,
Thanks for the referrence, this really helped. Just have some more questions, after running a particular command in Putty i get a Component table displayed over in Putty.
How do i get the table back as a response and store that in a datatable while sending the commands through the SSH activities.
It can send only text result as of now…check how you are getting it may be generate datatable can be used to convert to table based on how the text looks
Cheers
@Anil_G ,
Okay.
Can you please help me on. how do i receive the text results?
Thanks @Anil_G ,
That was of great help but now i am getting an error.
Message: Ssh error: Timeout 30s executing sudo -u icsadqa -i
Expected Regex: [a-zA-Z0-9_.-]@[a-zA-Z0-9_.-]
Received text: (/home/k1001285)$ sudo -u icsadqa -i
Password:, code: exception, command: sudo -u icsadqa -i
Which i believe is because SSH activity is not equipped to handle interactive password prompts.
Can you suggest any solution to this?
Yes it cannot…ideally the password needs to be given i the scope itself to connect and it would validate the welcome message with a regex
Can you give the creds in scope itself?
Cheers
Yeah, I have provided the password in the scope. But here whenever i run this particular command, it asks for the password again. So not sure how the password is to be passed there.
Thanks!
Currently I dont think you have that option enabled in these activities
There is a specific shell expected prompt to be provided
Cheers