简体   繁体   中英

How do you add different port on SshClient?

I am trying to connect using SshClient (Renci library) but I don't find a way to add a different port while connecting. It's using the default 22 port:

Code sample:

using (var client = new SshClient(IP, username, password)) { }

I saw that SshClient supports ports. You can write below:

using (var client = new SshClient(IP, port, username, password)) { }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM