.NET SSH库

收录时间:2014-03-06
资源分类:C#

简单说,SSH (Secure Shell) 是一种网络协议,用于计算机之间的加密登录。

如果一个用户从本地计算机,使用SSH协议登录另一台远程计算机,我们就可以认为,这种登录是安全的,即使被中途截获,密码也不会泄露。
最早的时候,互联网通信都是明文通信,一旦被截获,内容就暴露无疑。1995年,芬兰学者Tatu Ylonen设计了SSH协议,将登录信息全部加密,成为互联网安全的一个基本解决方案,迅速在全世界获得推广,目前已经成为Linux系统的标准配置。
需要指出的是,SSH只是一种协议,存在多种实现,既有商业实现,也有开源实现。本文针对的实现是OpenSSH,它是自由软件,应用非常广泛。
本文用.NET的C#程序实现了SSH的功能,支持完整的身份验证和文件传输等功能。
Key exchange: diffie-hellman-group-exchange-sha1, diffie-hellman-group1-sha1.
Cipher: 3des-cbc
MAC: hmac-md5
Host key type: ssh-rsa and partial ssh-dss.
Userauth: password, publickey (RSA)
Generating RSA key pairs.
Changing the passphrase for a private key.
SCP and SFTP

 

sharpSsh - A Secure Shell (SSH) library for .NET

Recently there was a need to connect to a SSH server from my C# code. I needed to perform a simple task: login to a remote Linux device, execute a command and read the response. I knew there were a number of free Java SSH libraries out there and I hoped to find a free .NET one that will allow me to do just that, but all I could find were commercial components. After experimenting with an open source Java SSH library called JSch I decided to try and port it to C# just for the sake of exercise. The result is the attached sharpSsh library and this article which explains how to use it

文件下载列表
sharpSsh_Binaries.zip (139.96KB)  sharpSsh_Demo.zip (156.75KB)  sharpSsh_Src.zip (252.62KB)  
附件内容(只显示89中的10个)
ChangePassphrase.cs  InputForm.cs  KeyGen.cs  KnownHosts.cs  ScpFrom.cs  ScpTo.cs  Sftp.cs  UserAuthPubKey.cs  AssemblyInfo.cs  ConsoleProgressBar.cs  
标签: SSH 
更多

目前尚无评论

用户反馈   关于我们
Copyright (©) ZHIHUISHI.COM 2013 All Rights Reserved.
京ICP备12012558号-7