Skip to content

Package: SshAuthenticationWithPassword

SshAuthenticationWithPassword

nameinstructionbranchcomplexitylinemethod
SshAuthenticationWithPassword(String, String, String, int)
M: 15 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
startSshRemoteUpdate(File[])
M: 16 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package update.remote.ssh.authentication;
2:
3: import java.io.File;
4:
5: import update.remote.exceptions.RemoteUpdateException;
6: import update.remote.ssh.SshRemoteUpdate;
7:
8: /**
9: *
10: * @author Muri
11: *
12: */
13: public class SshAuthenticationWithPassword implements AbstractSshAuthentication {
14:
15:         /**
16:          * username.
17:          */
18:         private final transient String user;
19:         /**
20:          * password for the user.
21:          */
22:         private final transient String password;
23:         /**
24:          * The routers IP.
25:          */
26:         private final transient String host;
27:         /**
28:          * This attribute represents the port for the connection.
29:          */
30:         private final transient int port;
31:
32:         /**
33:          *
34:          * @param user
35:          * user
36:          * @param password
37:          * password
38:          * @param host
39:          * host
40:          * @param port
41:          * port
42:          */
43:         public SshAuthenticationWithPassword(final String user, final String password,
44:                         final String host, final int port) {
45:                 this.user = user;
46:                 this.password = password;
47:                 this.host = host;
48:                 this.port = port;
49:         }
50:
51:         @Override
52:         public void startSshRemoteUpdate(final File[] files) throws RemoteUpdateException {
53:                 final SshRemoteUpdate sru = new SshRemoteUpdate(files);
54:                 sru.remoteUpdate(this.user, this.password, this.host, this.port);
55:         }
56:
57: }