[英]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上找到它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.