sharpssh

Download file based on date modified from SFTP

北战南征 提交于 2019-11-30 16:03:58
Is there a way to get the files from SFTP server that should be based on modified date using Tamir.SharpSsh? Currently I am downloading files by file name but my requirement is by Date Modified. var sftp = new Sftp(Host, UserName, Password); sftp.Connect(); sftp.Get(sourcePath+"/*.*." + name + "*", destinationPath); SharpSsh does not allow that. It's a dead project, do not use it. Anyway, I took a look at the code to assess how difficult it would be add possibility to retrieve file timestamp using the Sftp.GetFileList (since the library is open source). You would have to: Add a timestamp field

Get current user's credentials object in Powershell without prompting

女生的网名这么多〃 提交于 2019-11-26 09:45:54
问题 I have a Powershell script that is going to be run through an automation tool against multiple servers. It works fine on Windows machines, as the remote calls use the tool\'s service account without any need for prompting or exposing any credentials in code. This script also runs against Linux machines via SSH using the SharpSSH package. SharpSSH does not automatically use the Powershell user\'s credentials but requires either a username and password, an RSA key file, or a PSCredential object