Package ch.ethz.ssh2

Examples of ch.ethz.ssh2.ConnectionInfo


    }

    @Test
    public void testWithGanymede() throws Exception {
        // begin client config
        final Connection conn = new Connection("localhost", port);
        conn.connect(null, 5000, 0);
        conn.authenticateWithPassword("sshd", "sshd");
        final SCPClient scp_client = new SCPClient(conn);
        final Properties props = new Properties();
        props.setProperty("test", "test-passed");
        File f = new File("target/scp/gan");
        Utils.deleteRecursive(f);
        f.mkdirs();
        assertTrue(f.exists());

        String name = "test.properties";
        scp_client.put(toBytes(props, ""), name, "target/scp/gan");
        assertTrue(new File(f, name).exists());
        assertTrue(new File(f, name).delete());

        name = "test2.properties";
        scp_client.put(toBytes(props, ""), name, "target/scp/gan");
        assertTrue(new File(f, name).exists());
        assertTrue(new File(f, name).delete());

        assertTrue(f.delete());
        conn.close();
    }
View Full Code Here


    }

    @Test
    public void testWithGanymede() throws Exception {
        // begin client config
        final Connection conn = new Connection("localhost", port);
        conn.connect(null, 5000, 0);
        conn.authenticateWithPassword("sshd", "sshd");
        final SCPClient scp_client = new SCPClient(conn);
        final Properties props = new Properties();
        props.setProperty("test", "test-passed");
        File f = new File("target/scp/gan");
        Utils.deleteRecursive(f);
        f.mkdirs();
        assertTrue(f.exists());

        String name = "test.properties";
        scp_client.put(toBytes(props, ""), name, "target/scp/gan");
        assertTrue(new File(f, name).exists());
        assertTrue(new File(f, name).delete());

        name = "test2.properties";
        scp_client.put(toBytes(props, ""), name, "target/scp/gan");
        assertTrue(new File(f, name).exists());
        assertTrue(new File(f, name).delete());

        assertTrue(f.delete());
        conn.close();
    }
View Full Code Here

    /** {@inheritDoc} */
    public void open()
        throws AuthenticationException, CommandAbortedException
    {
        connection = new Connection( host, port );

        /* TODO: add proxy support
        ProxyData proxy = new HTTPProxyData( proxyHost, proxyPort, proxyUserName, proxyPassword );

        connection.setProxyData( proxy );
View Full Code Here

    }

    @Test
    public void testWithGanymede() throws Exception {
        // begin client config
        final Connection conn = new Connection("localhost", port);
        conn.connect(null, 5000, 0);
        conn.authenticateWithPassword("sshd", "sshd");
        final SCPClient scp_client = new SCPClient(conn);
        final Properties props = new Properties();
        props.setProperty("test", "test-passed");
        File f = new File("target/scp/gan");
        scp_client.put(toBytes(props, ""), "test.properties", "target/scp/gan");
        assertTrue(f.exists());
        scp_client.put(toBytes(props, ""), "test2.properties", "target/scp/gan");
        assertTrue(f.exists());
        f.delete();
        conn.close();
    }
View Full Code Here

        throw new IOException("Fatal error during MAC startup!");
      }

      tm.changeRecvCipher(cbc, mac);

      ConnectionInfo sci = new ConnectionInfo();

      kexCount++;

      sci.keyExchangeAlgorithm = kxs.np.kex_algo;
      sci.keyExchangeCounter = kexCount;
View Full Code Here

        throw new IOException("Fatal error during MAC startup!");
      }

      tm.changeRecvCipher(cbc, mac);

      ConnectionInfo sci = new ConnectionInfo();

      kexCount++;

      sci.keyExchangeAlgorithm = kxs.np.kex_algo;
      sci.keyExchangeCounter = kexCount;
View Full Code Here

        throw new IOException("Fatal error during MAC startup!");
      }

      tm.changeRecvCipher(cbc, mac);

      ConnectionInfo sci = new ConnectionInfo();

      kexCount++;

      sci.keyExchangeAlgorithm = kxs.np.kex_algo;
      sci.keyExchangeCounter = kexCount;
View Full Code Here

        throw new IOException("Fatal error during MAC startup!");
      }

      tm.changeRecvCipher(cbc, mac);

      ConnectionInfo sci = new ConnectionInfo();

      kexCount++;

      sci.keyExchangeAlgorithm = kxs.np.kex_algo;
      sci.keyExchangeCounter = kexCount;
View Full Code Here

        throw new IOException("Fatal error during MAC startup!");
      }

      tm.changeRecvCipher(cbc, mac);

      ConnectionInfo sci = new ConnectionInfo();

      kexCount++;

      sci.keyExchangeAlgorithm = kxs.np.kex_algo;
      sci.keyExchangeCounter = kexCount;
View Full Code Here

        throw new IOException("Fatal error during MAC startup!");
      }

      tm.changeRecvCipher(cbc, mac);

      ConnectionInfo sci = new ConnectionInfo();

      kexCount++;

      sci.keyExchangeAlgorithm = kxs.np.kex_algo;
      sci.keyExchangeCounter = kexCount;
View Full Code Here

TOP

Related Classes of ch.ethz.ssh2.ConnectionInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.