mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 07:10:53 +03:00
Fixed some codacy warnings
This commit is contained in:
@@ -15,16 +15,14 @@
|
||||
*/
|
||||
package com.hierynomus.sshj;
|
||||
|
||||
import net.schmizz.sshj.DefaultConfig;
|
||||
import net.schmizz.sshj.SSHClient;
|
||||
import net.schmizz.sshj.transport.verification.OpenSSHKnownHosts;
|
||||
import com.hierynomus.sshj.userauth.keyprovider.OpenSSHKeyV1KeyFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import net.schmizz.sshj.DefaultConfig;
|
||||
import net.schmizz.sshj.SSHClient;
|
||||
import net.schmizz.sshj.transport.verification.OpenSSHKnownHosts;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
@@ -35,8 +33,6 @@ public class IntegrationTest {
|
||||
SSHClient sshClient = new SSHClient(new DefaultConfig());
|
||||
sshClient.addHostKeyVerifier(new OpenSSHKnownHosts(new File("/Users/ajvanerp/.ssh/known_hosts")));
|
||||
sshClient.connect("172.16.37.147");
|
||||
// OpenSSHKeyV1KeyFile openSSHKeyV1KeyFile = new OpenSSHKeyV1KeyFile();
|
||||
// openSSHKeyV1KeyFile.init(new File("/Users/ajvanerp/.ssh/id_ed25519"));
|
||||
sshClient.authPublickey("jeroen");
|
||||
assertThat("Is connected", sshClient.isAuthenticated());
|
||||
}
|
||||
|
||||
@@ -157,7 +157,6 @@ public class OpenSSHKeyFileTest {
|
||||
public void shouldLoadED25519PrivateKey() throws IOException {
|
||||
OpenSSHKeyV1KeyFile keyFile = new OpenSSHKeyV1KeyFile();
|
||||
keyFile.init(new File("src/test/resources/keytypes/test_ed25519"));
|
||||
String expected = "256 MD5:d3:5e:40:72:db:08:f1:6d:0c:d7:6d:35:0d:ba:7c:32 root@sshj (ED25519)\n";
|
||||
PrivateKey aPrivate = keyFile.getPrivate();
|
||||
assertThat(aPrivate.getAlgorithm(), equalTo("EdDSA"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user