简体   繁体   English

从Windows通过SSH连接Linux

[英]Connect Linux via ssh from windows

My desktop is windows. 我的桌面是Windows。 And I would like to connect a Linux server remotely. 我想远程连接Linux服务器。 The middle target is to using script to ssh(using password, not key pairs) remote linux server from windows and run a command. 中间目标是使用脚本从Windows ssh(使用密码,而不是密钥对)远程Linux服务器并运行命令。 I have putty installed in my machine. 我的机器上已安装腻子。 The final target here is that I could use java to collect output from this script(remote connect a server via ssh password and run a command) and then parse the output and extract the data I want and put it in excel sheet. 这里的最终目标是,我可以使用Java从此脚本中收集输出(通过ssh password远程连接服务器并运行命令),然后解析输出并提取所需的数据并将其放在excel表中。 The remote server needs login and password. 远程服务器需要登录名和密码。

您为什么不尝试JSch

use jsch of jcraft 使用jcraft的jsch

here is one example 这是一个例子

http://www.jcraft.com/jsch/examples/JTAJSch.java http://www.jcraft.com/jsch/examples/JTAJSch.java

you can find it on SO as well 你也可以在SO上找到它

Jsch or SSHJ or Ganymed SSH-2? Jsch或SSHJ还是Ganymed SSH-2?

you could run plink (from PuTTY's developers) for running batches and writing the output to files, then process that with Java. 您可以运行plink (来自PuTTY的开发人员)来运行批处理并将输出写入文件,然后使用Java处理该链接。 I'm not sure how simple linking Java to PuTTY would be. 我不确定将Java链接到PuTTY会多么简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用integratedSecurity(Windows身份验证)通过JDBC从Linux连接到SQL Server? - Connect to SQL Server from Linux via JDBC using integratedSecurity (Windows authentication)? 通过Java Runtime.getRuntime()。exec从Windows连接到Linux机器 - connect to linux machine from windows via java Runtime.getRuntime().exec 从Windows(Java)连接到Linux服务器 - Connect to Linux server from Windows (Java) Windows和Linux中的Java SSH连接 - Java ssh connection in Windows and Linux 如何将MySql数据库从Windows Xp连接到linux ..? - how to connect a MySql database from Windows Xp to linux ..? 通过 JDBC 从 Linux 机器使用 Windows 身份验证连接到 SQL Server - Connect To SQL Server With Windows Authentication From A Linux Machine Through JDBC 如何将Windows中的Kafka(Java)应用程序连接到Linux中的Confluent - How to connect Kafka (Java) application from Windows to Confluent in Linux 如何通过EC2 SSH隧道从本地JAVA程序连接到RDS - How to connect to RDS from local JAVA program via EC2 SSH tunnel 使用Java中的ssh2连接到由RSA SecurID保护的Linux系统 - Connect to a linux system secured by RSA SecurID using ssh2 in Java 使用esh使用ssh连接到远程机器[linux server] - using eclipse to connect to remote machine[linux server] using ssh
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM