Reputation: 1929
I access my Unix server via ssh and I always do the same commands. This is the list of commands (first I login to the server):
cd /etc/openvpn
vi log.log
/huaze
(I'm using search function of vi):q
(exiting vi)service openvpn stop
service openvpn start
As you can see, I want to harness the power of automation and I can accomplish this with a click of a button; unfortunately this is challenging since it's ASP.NET and C# is going to access a Unix ssh protocol. So, how can I accomplish this in the most straightforward way.
Upvotes: 2
Views: 1447
Reputation: 156708
I haven't tried this myself, but it seems the SSH .NET library should give you the tools you need to SSH into any host, execute commands, and read the results. It shouldn't matter whether the host is Linux.
Upvotes: 1