实例介绍
Renci.SshNet测试小例子,连接SSH,执行Linux命令,并返回执行结果。 当然还有很多功能,需要网上资源使用
【实例截图】
【核心代码】
SshNetTest
└── ConsoleApplication1
├── ConsoleApplication1
│ ├── app.config
│ ├── bin
│ │ └── Debug
│ │ ├── ConsoleApplication1.exe
│ │ ├── ConsoleApplication1.exe.config
│ │ ├── ConsoleApplication1.pdb
│ │ ├── ConsoleApplication1.vshost.exe
│ │ ├── ConsoleApplication1.vshost.exe.config
│ │ ├── ConsoleApplication1.vshost.exe.manifest
│ │ ├── Renci.SshNet.dll
│ │ ├── Renci.SshNet.pdb
│ │ └── Renci.SshNet.xml
│ ├── ConsoleApplication1.csproj
│ ├── obj
│ │ └── Debug
│ │ ├── ConsoleApplication1.csproj.FileListAbsolute.txt
│ │ ├── ConsoleApplication1.csprojResolveAssemblyReference.cache
│ │ ├── ConsoleApplication1.exe
│ │ ├── ConsoleApplication1.pdb
│ │ └── DesignTimeResolveAssemblyReferencesInput.cache
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── SshExecHelper.cs
├── ConsoleApplication1.sln
├── ConsoleApplication1.v11.suo
├── Renci.SshNet
│ ├── AuthenticationMethod.cs
│ ├── AuthenticationResult.cs
│ ├── BaseClient.cs
│ ├── bin
│ │ └── Debug
│ │ ├── Renci.SshNet.dll
│ │ ├── Renci.SshNet.pdb
│ │ └── Renci.SshNet.xml
│ ├── Channels
│ │ ├── Channel.cs
│ │ ├── ChannelDirectTcpip.cs
│ │ ├── ChannelDirectTcpip.NET40.cs
│ │ ├── ChannelForwardedTcpip.cs
│ │ ├── ChannelForwardedTcpip.NET40.cs
│ │ ├── ChannelSession.cs
│ │ ├── ChannelTypes.cs
│ │ ├── ClientChannel.cs
│ │ ├── IChannel.cs
│ │ ├── IChannelDirectTcpip.cs
│ │ ├── IChannelForwardedTcpip.cs
│ │ ├── IChannelSession.cs
│ │ └── ServerChannel.cs
│ ├── CipherInfo.cs
│ ├── ClientAuthentication.cs
│ ├── CommandAsyncResult.cs
│ ├── Common
│ │ ├── ASCIIEncoding.cs
│ │ ├── AsyncResult.cs
│ │ ├── AuthenticationBannerEventArgs.cs
│ │ ├── AuthenticationEventArgs.cs
│ │ ├── AuthenticationPasswordChangeEventArgs.cs
│ │ ├── AuthenticationPrompt.cs
│ │ ├── AuthenticationPromptEventArgs.cs
│ │ ├── BigInteger.cs
│ │ ├── ChannelDataEventArgs.cs
│ │ ├── ChannelEventArgs.cs
│ │ ├── ChannelOpenConfirmedEventArgs.cs
│ │ ├── ChannelOpenFailedEventArgs.cs
│ │ ├── ChannelRequestEventArgs.cs
│ │ ├── DerData.cs
│ │ ├── ExceptionEventArgs.cs
│ │ ├── Extensions.cs
│ │ ├── Extensions.NET40.cs
│ │ ├── Extensions.NET.cs
│ │ ├── HostKeyEventArgs.cs
│ │ ├── NetConfServerException.cs
│ │ ├── NetConfServerException.NET40.cs
│ │ ├── ObjectIdentifier.cs
│ │ ├── PipeStream.cs
│ │ ├── PortForwardEventArgs.cs
│ │ ├── ProxyException.cs
│ │ ├── ProxyException.NET40.cs
│ │ ├── ScpDownloadEventArgs.cs
│ │ ├── ScpException.cs
│ │ ├── ScpException.NET40.cs
│ │ ├── ScpUploadEventArgs.cs
│ │ ├── SemaphoreLight.cs
│ │ ├── SftpPathNotFoundException.cs
│ │ ├── SftpPathNotFoundException.NET40.cs
│ │ ├── SftpPermissionDeniedException.cs
│ │ ├── SftpPermissionDeniedException.NET40.cs
│ │ ├── ShellDataEventArgs.cs
│ │ ├── SshAuthenticationException.cs
│ │ ├── SshAuthenticationException.NET40.cs
│ │ ├── SshConnectionException.cs
│ │ ├── SshConnectionException.NET40.cs
│ │ ├── SshData.cs
│ │ ├── SshException.cs
│ │ ├── SshException.NET40.cs
│ │ ├── SshOperationTimeoutException.cs
│ │ ├── SshOperationTimeoutException.NET40.cs
│ │ ├── SshPassPhraseNullOrEmptyException.cs
│ │ ├── SshPassPhraseNullOrEmptyException.NET40.cs
│ │ └── TerminalModes.cs
│ ├── Compression
│ │ ├── CompressionMode.cs
│ │ ├── Compressor.cs
│ │ ├── Zlib.cs
│ │ ├── ZlibOpenSsh.cs
│ │ └── ZlibStream.cs
│ ├── ConnectionInfo.cs
│ ├── Documentation
│ │ ├── Renci.SshNet.content
│ │ └── SshNet.shfbproj
│ ├── ExpectAction.cs
│ ├── ExpectAsyncResult.cs
│ ├── ForwardedPort.cs
│ ├── ForwardedPortDynamic.cs
│ ├── ForwardedPortDynamic.NET40.cs
│ ├── ForwardedPortDynamic.NET.cs
│ ├── ForwardedPortLocal.cs
│ ├── ForwardedPortLocal.NET40.cs
│ ├── ForwardedPortLocal.NET.cs
│ ├── ForwardedPortRemote.cs
│ ├── ForwardedPortRemote.NET40.cs
│ ├── ForwardedPortRemote.NET.cs
│ ├── HashInfo.cs
│ ├── IAuthenticationMethod.cs
│ ├── IConnectionInfo.cs
│ ├── IForwardedPort.cs
│ ├── IServiceFactory.cs
│ ├── IServiceFactory.NET.cs
│ ├── ISession.cs
│ ├── ISubsystemSession.cs
│ ├── KeyboardInteractiveAuthenticationMethod.cs
│ ├── KeyboardInteractiveAuthenticationMethod.NET40.cs
│ ├── KeyboardInteractiveConnectionInfo.cs
│ ├── KeyboardInteractiveConnectionInfo.NET40.cs
│ ├── MessageEventArgs.cs
│ ├── Messages
│ │ ├── Authentication
│ │ │ ├── BannerMessage.cs
│ │ │ ├── FailureMessage.cs
│ │ │ ├── InformationRequestMessage.cs
│ │ │ ├── InformationResponseMessage.cs
│ │ │ ├── PasswordChangeRequiredMessage.cs
│ │ │ ├── PublicKeyMessage.cs
│ │ │ ├── RequestMessage.cs
│ │ │ ├── RequestMessageHost.cs
│ │ │ ├── RequestMessageKeyboardInteractive.cs
│ │ │ ├── RequestMessageNone.cs
│ │ │ ├── RequestMessagePassword.cs
│ │ │ ├── RequestMessagePublicKey.cs
│ │ │ └── SuccessMessage.cs
│ │ ├── Connection
│ │ │ ├── ChannelCloseMessage.cs
│ │ │ ├── ChannelDataMessage.cs
│ │ │ ├── ChannelEofMessage.cs
│ │ │ ├── ChannelExtendedDataMessage.cs
│ │ │ ├── ChannelFailureMessage.cs
│ │ │ ├── ChannelMessage.cs
│ │ │ ├── ChannelOpen
│ │ │ │ ├── ChannelOpenInfo.cs
│ │ │ │ ├── ChannelOpenMessage.cs
│ │ │ │ ├── DirectTcpipChannelInfo.cs
│ │ │ │ ├── ForwardedTcpipChannelInfo.cs
│ │ │ │ ├── SessionChannelOpenInfo.cs
│ │ │ │ └── X11ChannelOpenInfo.cs
│ │ │ ├── ChannelOpenConfirmationMessage.cs
│ │ │ ├── ChannelOpenFailureMessage.cs
│ │ │ ├── ChannelOpenFailureReasons.cs
│ │ │ ├── ChannelRequest
│ │ │ │ ├── BreakRequestInfo.cs
│ │ │ │ ├── ChannelRequestMessage.cs
│ │ │ │ ├── EndOfWriteRequestInfo.cs
│ │ │ │ ├── EnvironmentVariableRequestInfo.cs
│ │ │ │ ├── ExecRequestInfo.cs
│ │ │ │ ├── ExitSignalRequestInfo.cs
│ │ │ │ ├── ExitStatusRequestInfo.cs
│ │ │ │ ├── KeepAliveRequestInfo.cs
│ │ │ │ ├── PseudoTerminalInfo.cs
│ │ │ │ ├── RequestInfo.cs
│ │ │ │ ├── ShellRequestInfo.cs
│ │ │ │ ├── SignalRequestInfo.cs
│ │ │ │ ├── SubsystemRequestInfo.cs
│ │ │ │ ├── WindowChangeRequestInfo.cs
│ │ │ │ ├── X11ForwardingRequestInfo.cs
│ │ │ │ └── XonXoffRequestInfo.cs
│ │ │ ├── ChannelSuccessMessage.cs
│ │ │ ├── ChannelWindowAdjustMessage.cs
│ │ │ ├── GlobalRequestMessage.cs
│ │ │ ├── GlobalRequestName.cs
│ │ │ ├── RequestFailureMessage.cs
│ │ │ └── RequestSuccessMessage.cs
│ │ ├── MessageAttribute.cs
│ │ ├── Message.cs
│ │ ├── ServiceName.cs
│ │ └── Transport
│ │ ├── DebugMessage.cs
│ │ ├── DisconnectMessage.cs
│ │ ├── DisconnectReason.cs
│ │ ├── IgnoreMessage.cs
│ │ ├── IKeyExchangedAllowed.cs
│ │ ├── KeyExchangeDhGroupExchangeGroup.cs
│ │ ├── KeyExchangeDhGroupExchangeInit.cs
│ │ ├── KeyExchangeDhGroupExchangeReply.cs
│ │ ├── KeyExchangeDhGroupExchangeRequest.cs
│ │ ├── KeyExchangeDhInitMessage.cs
│ │ ├── KeyExchangeDhReplyMessage.cs
│ │ ├── KeyExchangeEcdhInitMessage.cs
│ │ ├── KeyExchangeEcdhReplyMessage.cs
│ │ ├── KeyExchangeInitMessage.cs
│ │ ├── NewKeysMessage.cs
│ │ ├── ServiceAcceptMessage.cs
│ │ ├── ServiceRequestMessage.cs
│ │ └── UnimplementedMessage.cs
│ ├── Netconf
│ │ ├── INetConfSession.cs
│ │ └── NetConfSession.cs
│ ├── NetConfClient.cs
│ ├── NoneAuthenticationMethod.cs
│ ├── NoneConnectionInfo.cs
│ ├── obj
│ │ └── Debug
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ ├── Renci.SshNet.csproj.FileListAbsolute.txt
│ │ ├── Renci.SshNet.csprojResolveAssemblyReference.cache
│ │ ├── Renci.SshNet.dll
│ │ └── Renci.SshNet.pdb
│ ├── PasswordAuthenticationMethod.cs
│ ├── PasswordAuthenticationMethod.NET40.cs
│ ├── PasswordConnectionInfo.cs
│ ├── PasswordConnectionInfo.NET40.cs
│ ├── PrivateKeyAuthenticationMethod.cs
│ ├── PrivateKeyConnectionInfo.cs
│ ├── PrivateKeyFile.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── CommonAssemblyInfo.cs
│ ├── ProxyTypes.cs
│ ├── Renci.SshNet.csproj
│ ├── Renci.SshNet.csproj.vspscc
│ ├── ScpClient.cs
│ ├── ScpClient.NET.cs
│ ├── Security
│ │ ├── Algorithm.cs
│ │ ├── CertificateHostAlgorithm.cs
│ │ ├── Cryptography
│ │ │ ├── AsymmetricCipher.cs
│ │ │ ├── BlockCipher.cs
│ │ │ ├── Cipher.cs
│ │ │ ├── CipherDigitalSignature.cs
│ │ │ ├── Ciphers
│ │ │ │ ├── AesCipher.cs
│ │ │ │ ├── Arc4Cipher.cs
│ │ │ │ ├── BlowfishCipher.cs
│ │ │ │ ├── CastCipher.cs
│ │ │ │ ├── CipherMode.cs
│ │ │ │ ├── CipherPadding.cs
│ │ │ │ ├── DesCipher.cs
│ │ │ │ ├── Modes
│ │ │ │ │ ├── CbcCipherMode.cs
│ │ │ │ │ ├── CfbCipherMode.cs
│ │ │ │ │ ├── CtrCipherMode.cs
│ │ │ │ │ └── OfbCipherMode.cs
│ │ │ │ ├── Paddings
│ │ │ │ │ ├── PKCS5Padding.cs
│ │ │ │ │ └── PKCS7Padding.cs
│ │ │ │ ├── RsaCipher.cs
│ │ │ │ ├── SerpentCipher.cs
│ │ │ │ ├── TripleDesCipher.cs
│ │ │ │ └── TwofishCipher.cs
│ │ │ ├── DigitalSignature.cs
│ │ │ ├── DsaDigitalSignature.cs
│ │ │ ├── DsaKey.cs
│ │ │ ├── Hashes
│ │ │ │ ├── MD5Hash.cs
│ │ │ │ ├── RIPEMD160Hash.cs
│ │ │ │ ├── SHA1Hash.cs
│ │ │ │ ├── SHA256Hash.cs
│ │ │ │ ├── SHA2HashBase.cs
│ │ │ │ ├── SHA384Hash.cs
│ │ │ │ └── SHA512Hash.cs
│ │ │ ├── HMAC.cs
│ │ │ ├── Key.cs
│ │ │ ├── RsaDigitalSignature.cs
│ │ │ ├── RsaKey.cs
│ │ │ ├── StreamCipher.cs
│ │ │ └── SymmetricCipher.cs
│ │ ├── GroupExchangeHashData.cs
│ │ ├── HostAlgorithm.cs
│ │ ├── KeyExchange.cs
│ │ ├── KeyExchangeDiffieHellman.cs
│ │ ├── KeyExchangeDiffieHellmanGroup14Sha1.cs
│ │ ├── KeyExchangeDiffieHellmanGroup1Sha1.cs
│ │ ├── KeyExchangeDiffieHellmanGroupExchangeSha1.cs
│ │ ├── KeyExchangeDiffieHellmanGroupExchangeSha256.cs
│ │ ├── KeyExchangeDiffieHellmanGroupExchangeShaBase.cs
│ │ ├── KeyExchangeDiffieHellmanGroupSha1.cs
│ │ ├── KeyExchangeEllipticCurveDiffieHellman.cs
│ │ └── KeyHostAlgorithm.cs
│ ├── ServiceFactory.cs
│ ├── ServiceFactory.NET.cs
│ ├── Session.cs
│ ├── Session.NET40.cs
│ ├── Session.NET.cs
│ ├── Sftp
│ │ ├── Flags.cs
│ │ ├── ISftpSession.cs
│ │ ├── Requests
│ │ │ ├── ExtendedRequests
│ │ │ │ ├── FStatVfsRequest.cs
│ │ │ │ ├── HardLinkRequest.cs
│ │ │ │ ├── PosixRenameRequest.cs
│ │ │ │ └── StatVfsRequest.cs
│ │ │ ├── PosixRenameRequest.cs
│ │ │ ├── SftpBlockRequest.cs
│ │ │ ├── SftpCloseRequest.cs
│ │ │ ├── SftpExtendedRequest.cs
│ │ │ ├── SftpFSetStatRequest.cs
│ │ │ ├── SftpFStatRequest.cs
│ │ │ ├── SftpInitRequest.cs
│ │ │ ├── SftpLinkRequest.cs
│ │ │ ├── SftpLStatRequest.cs
│ │ │ ├── SftpMkDirRequest.cs
│ │ │ ├── SftpOpenDirRequest.cs
│ │ │ ├── SftpOpenRequest.cs
│ │ │ ├── SftpReadDirRequest.cs
│ │ │ ├── SftpReadLinkRequest.cs
│ │ │ ├── SftpReadRequest.cs
│ │ │ ├── SftpRealPathRequest.cs
│ │ │ ├── SftpRemoveRequest.cs
│ │ │ ├── SftpRenameRequest.cs
│ │ │ ├── SftpRequest.cs
│ │ │ ├── SftpRmDirRequest.cs
│ │ │ ├── SftpSetStatRequest.cs
│ │ │ ├── SftpStatRequest.cs
│ │ │ ├── SftpSymLinkRequest.cs
│ │ │ ├── SftpUnblockRequest.cs
│ │ │ ├── SftpWriteRequest.cs
│ │ │ └── StatVfsRequest.cs
│ │ ├── Responses
│ │ │ ├── ExtendedReplies
│ │ │ │ ├── ExtendedReplyInfo.cs
│ │ │ │ └── StatVfsReplyInfo.cs
│ │ │ ├── SftpAttrsResponse.cs
│ │ │ ├── SftpDataResponse.cs
│ │ │ ├── SftpExtendedReplyResponse.cs
│ │ │ ├── SftpHandleResponse.cs
│ │ │ ├── SftpNameResponse.cs
│ │ │ ├── SftpResponse.cs
│ │ │ ├── SftpStatusResponse.cs
│ │ │ ├── SftpVersionResponse.cs
│ │ │ └── StatVfsResponse.cs
│ │ ├── SftpDataMessage.cs
│ │ ├── SftpDownloadAsyncResult.cs
│ │ ├── SftpFileAttributes.cs
│ │ ├── SftpFile.cs
│ │ ├── SftpFileStream.cs
│ │ ├── SftpFileSystemInformation.cs
│ │ ├── SftpListDirectoryAsyncResult.cs
│ │ ├── SftpMessage.cs
│ │ ├── SftpMessageTypes.cs
│ │ ├── SftpSession.cs
│ │ ├── SftpSynchronizeDirectoriesAsyncResult.cs
│ │ ├── SftpUploadAsyncResult.cs
│ │ └── StatusCodes.cs
│ ├── SftpClient.cs
│ ├── SftpClient.NET40.cs
│ ├── SftpClient.NET.cs
│ ├── Shell.cs
│ ├── Shell.NET40.cs
│ ├── ShellStream.cs
│ ├── ShellStream.NET40.cs
│ ├── SshClient.cs
│ ├── SshCommand.cs
│ ├── SshCommand.NET40.cs
│ └── SubsystemSession.cs
└── Renci.SshNet.snk
35 directories, 343 files
标签:
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论