?? j2ssh-advanced.htm
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<h2><font face="Verdana, Arial, Helvetica, sans-serif"><a name="top"></a>J2SSH - Advanced Connectivity</font></h2>
<p><a href="#connectionproperties">Connection Properties</a><br>
<a href="#profiles">Connection Profiles</a><br>
<a href="#monitor">Monitoring the Connection State</a><br>
<a href="#serverhostkey">Verifying the Server's Host Key</a></font>
</p>
</p>
<p><a name="connectionproperties"></a><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><em>Connection
Properties</em></strong></font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Each SSH connection
has a number of components, they include encryption ciphers, message authentication
algorithms and compression settings. The SSH protocol states that these components
must run independently of each other in both directions on the connection. The
following class makes it possible to configure these settings:</font>
<blockquote><pre>import com.sshtools.j2ssh.configuration.SshConnectionProperties</pre></blockquote>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">When using the
SshClient connect method, it is possible to pass an SshConnectionProperties
instance instead of<br>
a hostname.</font></p>
<blockquote>
<pre>SshConnectionProperties properties = new SshConnectionProperties();<br>
properties.setHost("firestar");
properties.setPort(22);<br>
ssh.connect(properties);</pre>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2">There are
additional methods to set the preferred ciphers:</font></font></p>
<blockquote>
<pre>// Sets the preferred client->server encryption cipher
properties.setPrefCSEncryption("blowfish-cbc");<br>
// Sets the preferred server->client encryption cipher
properties.setPrefSCEncryption("3des-cbc");</pre>
</blockquote>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The parameter passed
should be the name of the SSH cipher that you require, this can be any installed
cipher, the following are currently supported.</font></p> </p>
<blockquote>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -