The SFTP Server supports implementation of custom command via SSH session. If there is more than one user login to the Server, what is the proper way for the Server to identify the user that raise that custom command ?
An instance of ShellCommandEventArgs passed to FileServer's ShellCommand event features a User property that identifies the user who raised the command:
server.ShellCommand += (sender, e) => { if (e.Command == "whoami") { e.WriteLine(e.User.Name); } };
Welcome to Q&A forum for C# and VB.NET developers working with following .NET components:
Applications:
If you need immediate assistance, please contact us directly.