The following examples were posted with the original JSch java library,
and were translated to C#
====================================================================
- Shell.cs
This program enables you to connect to sshd server and get the shell prompt.
You will be asked username, hostname and passwd.
If everything works fine, you will get the shell prompt. Output will
be ugly because of lacks of terminal-emulation, but you can issue commands.
- Exec.cs
This program will demonstrate remote exec.
You will be asked username, hostname, displayname, passwd and command.
If everything works fine, given command will be invoked
on the remote side and outputs will be printed out. In this sample,
X forwarding is enabled, so you can give an X client as a command.
- PortForwardingR.cs
This program will demonstrate the port forwarding like option -R of
ssh command; the given port on the remote host will be forwarded to
the given host and port on the local side.
You will be asked username, hostname, port:host:hostport and passwd.
If everything works fine, you will get the shell prompt.
Try the port on remote host.
- PortForwardingL.cs
This program will demonstrate the port forwarding like option -L of
ssh command; the given port on the local host will be forwarded to
the given remote host and port on the remote side.
You will be asked username, hostname, port:host:hostport and passwd.
If everything works fine, you will get the shell prompt.
Try the port on localhost.
- StreamForwarding.cs
This program will demonstrate the stream forwarding. The given Java
I/O streams will be forwared to the given remote host and port on
the remote side. It is simmilar to the -L option of ssh command,
but you don't have to assign and open a local tcp port.
You will be asked username, hostname, host:hostport and passwd.
If everything works fine, System.in and System.out streams will be
forwared to remote port and you can send messages from command line.
- UserAuthPubKey.cs
This program will demonstrate the user authentification by public key.
You will be asked username, hostname, privatekey(id_dsa) and passphrase.
If everything works fine, you will get the shell prompt
- ScpTo.cs
This program will demonstrate the file transfer from local to remote.
You will be asked passwd.
If everything works fine, a local file 'file1' will copied to
'file2' on 'remotehost'.
- ScpFrom.cs
This program will demonstrate the file transfer from remote to local
You will be asked passwd.
If everything works fine, a file 'file1' on 'remotehost' will copied to
local 'file1'.
- Sftp.cs
This program will demonstrate the sftp protocol support.
You will be asked username, host and passwd.
If everything works fine, you will get a prompt 'sftp>'.
'help' command will show available command.
In current implementation, the destination path for 'get' and 'put'
commands must be a file, not a directory.
- KnownHosts.cs
This program will demonstrate the 'known_hosts' file handling.
You will be asked username, hostname, a path for 'known_hosts' and passwd.
If everything works fine, you will get the shell prompt.
In current implementation, jsch only reads 'known_hosts' for checking
and does not modify it.
- KeyGen.cs
This progam will demonstrate the RSA/DSA keypair generation.
You will be asked a passphrase for output_keyfile.
If everything works fine, you will get the DSA or RSA keypair,
output_keyfile and output_keyfile+".pub".
The private key and public key are in the OpenSSH format.
- ChangePassphrase.cs
This program will demonstrate to change the passphrase for a
private key file instead of creating a new private key.
A passphrase will be prompted if the given private-key has been
encrypted. After successfully loading the content of the
private-key, the new passphrase will be prompted and the given
private-key will be re-encrypted with that new passphrase.
- AES.cs
This program will demonstrate how to use "aes128-cbc".
- Daemon.cs
This program will demonstrate how to provide a network service like
inetd by using remote port-forwarding functionality.
- ViaHTTP.cs
This program will demonstrate the ssh session via HTTP proxy.
You will be asked username, hostname, proxy-server and passwd.
If everything works fine, you will get the shell prompt.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
c# SharpSSH执行SSH命令例子 (487个子文件)
ResolveAssemblyReference.cache 9KB
ResolveAssemblyReference.cache 9KB
DesignTimeResolveAssemblyReferencesInput.cache 6KB
DesignTimeResolveAssemblyReferencesInput.cache 6KB
DesignTimeResolveAssemblyReferencesInput.cache 5KB
DesignTimeResolveAssemblyReferencesInput.cache 5KB
DesignTimeResolveAssemblyReferencesInput.cache 5KB
DesignTimeResolveAssemblyReferencesInput.cache 5KB
ChannelSftp.cs 65KB
ChannelSftp.cs 65KB
Session.cs 46KB
Session.cs 46KB
IdentityFile.cs 24KB
IdentityFile.cs 24KB
KeyPair.cs 17KB
KeyPair.cs 17KB
Scp.cs 17KB
Scp.cs 17KB
Util.cs 14KB
Util.cs 14KB
Channel.cs 13KB
Channel.cs 13KB
Sftp.cs 13KB
Sftp.cs 13KB
Sftp.cs 13KB
Sftp.cs 13KB
PipedInputStream.cs 13KB
PipedInputStream.cs 13KB
KnownHosts.cs 13KB
KnownHosts.cs 13KB
Channel.old.cs 12KB
Channel.old.cs 12KB
KeyPairRSA.cs 10KB
KeyPairRSA.cs 10KB
SshStream.cs 10KB
SshStream.cs 10KB
DHG1.cs 10KB
DHG1.cs 10KB
Scp.old.cs 10KB
SftpATTRS.cs 9KB
SftpATTRS.cs 9KB
DHGEX.cs 9KB
DHGEX.cs 9KB
Main.cs 9KB
UserAuthPublicKey.cs 8KB
UserAuthPublicKey.cs 8KB
ChannelForwardedTCPIP.cs 8KB
ChannelForwardedTCPIP.cs 8KB
SshBase.cs 8KB
SshBase.cs 8KB
JSch.cs 8KB
JSch.cs 8KB
SshShell.cs 8KB
SshShell.cs 8KB
CombinedStream.cs 7KB
CombinedStream.cs 7KB
KeyPairDSA.cs 7KB
KeyPairDSA.cs 7KB
PipedOutputStream.cs 7KB
PipedOutputStream.cs 7KB
ChannelX11.cs 7KB
ChannelX11.cs 7KB
UserAuthKeyboardInteractive.cs 6KB
UserAuthKeyboardInteractive.cs 6KB
sharpSshTest.cs 6KB
sharpSshTest.cs 6KB
PortWatcher.cs 6KB
PortWatcher.cs 6KB
Buffer.cs 6KB
Buffer.cs 6KB
SignatureRSA.cs 6KB
SignatureRSA.cs 6KB
KeyExchange.cs 6KB
KeyExchange.cs 6KB
Sftp.cs 5KB
Sftp.cs 5KB
ChannelDirectTCPIP.cs 5KB
ChannelDirectTCPIP.cs 5KB
SshHelper.cs 5KB
ScpFrom.cs 5KB
ScpFrom.cs 5KB
ScpFrom.cs 5KB
ScpFrom.cs 5KB
InputForm.cs 5KB
InputForm.cs 5KB
InputForm.cs 5KB
InputForm.cs 5KB
UserAuthPassword.cs 5KB
UserAuthPassword.cs 5KB
KnownHosts.cs 5KB
KnownHosts.cs 5KB
KnownHosts.cs 5KB
KnownHosts.cs 5KB
ProtectedConsoleStream.cs 5KB
ProtectedConsoleStream.cs 5KB
ScpTo.cs 4KB
ScpTo.cs 4KB
ScpTo.cs 4KB
ScpTo.cs 4KB
IO.cs 4KB
共 487 条
- 1
- 2
- 3
- 4
- 5
ccyyss
- 粉丝: 36
- 资源: 21
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页