Link to home
Start Free TrialLog in
Avatar of canuckconsulting
canuckconsultingFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How run a telnet command on AIX server via C# program

We have an AIX unix server we need to connect to and then run two commands using C# or something in SSIS. How can we do this? Ultimately we are working to automate what is currently a manual task for us.

cd /strbus/fw
sh job/edid2c
Avatar of ste5an
ste5an
Flag of Germany image

You don't want to do this. This will raise just some serious security questions..

Maybe you want to SSH into that machine to start this job,  Here you should look into SSH.NET and SharpSSH (nuget).

For a secure invocation of this job, you need a separate account on the AIX, which can only execute that job and nothing else. Otherwise you'll introduce some further security problems.

What's your use-case? What kind of job is it?
Avatar of canuckconsulting

ASKER

Thanks for reply.

We have an SSIS job which pulls orders in from an externa system, formats the file and places in an import folder on the AIX server.  To get the orders imported we need to run the command in my initial post.

So we need to be able to control when thsi utility is called.
Na..

Just let a cron job check that directory every minute or so for existing files and import them. Much simpler.
Avatar of noci
noci

TELNET / FTP / RSH / RCMD and some other classic protocols are NO-GO areas. As they require passwords to be sent unencrypted across a  network or have an explicit trust on the remote system to not lie about the current user.

Please use SSH  to access systems for issuing commands.
As ste5an + noci said, rsh/telnet have been deprecated for years.

You'll only use these if being hacked is acceptable.

Use ssh instead.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.