Anybody used the telnet command component?

yliquor's picture

I have a guy on my team that is trying to get this component to work.  It doesn't look like the component allows for variables on the command input, but what is the embedded model for?  Here is what he was getting stuck on...

Anyone have any information on this component. I've been playing around with it and if i hardcode into the commands list:

username

password

command > file

the file gets created. Super. Now I want to get the username and password from a variable i have set up, however it doesn't look like I'm able to reference any variables for the input.

Also what is the embedded model that is associated with it? I have just been going through and having it create a value and nothing else ( just to get the component to validate ).

Below is what I'd like to do ( but I think its sending a string of "[[Global].RemedyInformation.RUsername]" versus the actual username. )

ChrisBern's picture

Telnet

I have not used the Telnet component, and don't readily have an environment to test it against.  But in looking at the component interface and in reading your description, it does seem to be a limited-use component in that it does not appear to accept variables for the commands.  Telnet, of course, also has its own security risks in the way it passes data as clear text.

You may want to consider using Workflow Solution to execute scripts on Unix/Linux computers using an SSH session.  It is a bit of work, but achievable.  You would first need to create a Putty connection profile, and connect one time to populate the registry with each foreign hosts' key.

For example, here is an NS 6 script task sample:
@"C:\PuTTY\plink" -load fd10 -l admin -pw mypassword -m "C:\PuTTY\test.txt"

Where test.txt contains the list of commands you want to run.  test.txt could be dynamically created by the Workflow project as well, using process variables.  And of course the admin and password (as well as any of the items in the above command line) could be variabilized.

Another option would be to obtain a third-party SSH .NET library and create new SSH components in Workflow from that library.

XIANRAIN's picture

Thanks for the feedback

Thanks for the feedback Chrisburn this would be helpful my colleague actually has the same query.