コード例 #1
0
ファイル: TestVmwareUtil.java プロジェクト: xiufan/CloudStack
  public void testScp() {
    try {
      File file = new File("c:\\temp\\id_rsa.kelven");
      if (!file.exists()) {
        System.out.println("key file does not exist!");
      }

      SshHelper.scpTo(
          "192.168.1.107",
          22,
          "kelven",
          file,
          null,
          "~",
          "Hello, world".getBytes(),
          "hello.txt",
          null);
    } catch (Exception e) {
      s_logger.error("Unexpected exception : ", e);
    }
  }