내가 Tamir SharpSSH를 사용하고 있습니다. 하지만 C# 코드를 사용하여 명령을 실행해야합니다. 파일 서버를 넣지 만이 명령을 실행해야합니다.SharpSSH를 사용하여 프로그래밍 방식으로 SFTP 서버에서 명령을 실행하는 방법은 무엇입니까?
SshTransferProtocolBase sshCp;
const string sftp_host = "xxx";
const string sftp_user = "xxx";
const string sftp_pass = "xxx";
const int sftp_port = 22;
var sftp = new Sftp(sftp_host, sftp_user, sftp_pass);
sftp.Connect(sftp_port);
sftp.Put(@"D:\\" + Teslim + ".txt", "../");
sftp.Close();
이 코드가 작동하려면 루트로 명령을 실행해야하나요?