Putty - Delete files dynamically using C#

后端 未结 3 1933
渐次进展
渐次进展 2021-01-27 04:55

I am working on a Windows app with C# as a programming langugage.

Requirement is

  1. to login to putty dynamically
  2. delete old files from specific loca
3条回答
  •  难免孤独
    2021-01-27 05:26

    To answer your question we should first make some things clear:

    (1) You do not login to PuTTY. You use PuTTY to establish a connection to a remote server and to start a shell. Therefore you login to the server hostname

    (2) PuTTY is a program to provide an interactive shell to the user. It is not intended to be used as an programming interface

    What you look for is a SSH client library such as https://sshnet.codeplex.com/ (never used it, stated here as an example). Such libraries allow you to send commands using .NET using a predefined API

提交回复
热议问题