问题标签 [plink]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
431 浏览

c# - Process not redirecting complete output; not showing full response from SSH Server

I'm starting up a process and making use of plink to create a reverse tunnel to an ssh that's in my local network.

I can connect fine to the server, but its not displaying the full content on the console window, my goal is to wait for everything to display and then proceed by inputting the password using process.standardInput.

I should receive this on the console window:

But i receive just the first line:

If i press enter, it does provide me with the "Incorrect password error" but i never see "Passphrase for key rsa-key...."

Also please note that I did put in the correct password and the console remained blank, but on the Linux shell that holds the SSH server, I ran a who command and noticed I was connected successfully.

What could be the issue here?

0 投票
1 回答
1198 浏览

c++ - 在树莓派上点击

我正在尝试在 Windows 上用 C++ 开发一个命令行程序,它使用 putty 来控制 Raspberry Pi。我使用了 Putty 应用程序,它可以 100% 正常工作。但是我尝试使用 plink 可执行文件,以便可以使用我的 C++ 程序控制该程序,但是当我尝试连接到 Pi 时,我得到一个随机字符串。控制台输出如下

(当我按回车时,最后一行再次出现)。

请问有什么帮助吗?

0 投票
1 回答
3657 浏览

plink - Plink 错误 - “无法使用此帐户执行 unix shell 命令”

我正在尝试运行plink.exe在远程 UNIX 机器上执行命令。使用Putty登录时,我的命令执行成功。我的问题是当使用相同的凭据(相同的用户和密码)通过 plink 执行相同的命令时。

我不断收到一条消息“无法使用此帐户执行 UNIX shell 命令”。对于我输入的每个命令,我都会收到相同的消息。

我用来运行命令的语法是这样的:

我也尝试过以不同的方式输入,例如:

但结果总是一样的。
我正在使用具有管理员功能的用户。

我很乐意得到任何帮助。

0 投票
1 回答
10801 浏览

batch-file - Windows 批处理脚本和 plink.exe

我想结合 Windows 批处理脚本和 plink.exe 工具(http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)并作为循环运行但没有运气,下面是我的。感谢您的帮助

或者它只是将 Windows 批处理脚本作为循环运行。

并重复到 ip.txt 文件中的下一个 IP 地址

0 投票
2 回答
7283 浏览

bash - 实时从标准输出读取内容

我有一个外部设备需要启动,然后等待它正常启动。我想要执行此操作的方法是通过串行端口(通过 Plink,它是 PuTTY 的命令行工具)连接到它并读取它打印的所有文本行并尝试找到表明它已启动的文本字符串适当地。找到该文本字符串后,脚本将继续执行。

问题是我需要实时阅读这些文本行。到目前为止,我只看到了调用命令并在命令完成后处理其输出的方法。或者,我可以通过将 & 附加到命令并将输出重定向到文件来让 Plink 在后台运行。但问题是这个文件从一开始就是空的,所以脚本将直接继续。有没有办法等待某个文件的新行并在它出现时读取它?或者有没有人有任何其他想法如何做到这一点?

这是迄今为止我找到的最佳解决方案:

但是,我希望脚本在找到正确的文本字符串后直接继续。

所以,简而言之,有没有办法在命令完成执行之前连续访问命令的输出?

0 投票
1 回答
666 浏览

batch-file - 重试 plink 批处理文件错误

有时在发送该批次时

vsreset.txt 在哪里

我收到一些错误,例如

我想做一批重试直到“没有发现错误”我该怎么做?

我试过这样的东西

但我总是收到 errorlevel = 1 并且例程不会停止......

0 投票
1 回答
2721 浏览

authentication - 使用 Plink 时 PuTTy 连接但密钥被拒绝

我已经使用与 putty 完美连接的私钥(无密码)创建了一个 putty 会话。但是,当我通过 plink 连接、在同一台机器上加载相同的会话、指定相同的用户名时,我收到 No supported authentication methods available 消息。有任何想法吗?我需要从 CLI 使用 plink 而无需通过 putty gui。我在 Win 2008 中安装了 putty-0.62-installer。

这是我正在使用的 CLI 字符串:c:\progra~2\putty\plink -ssh -load mysessionname -l user.name

结果:服务器拒绝了我们的密钥致命错误:断开连接:没有可用的支持的身份验证方法(服务器发送:publickey、gssapi-keyex、gssapi-with-mic)

0 投票
2 回答
755 浏览

windows - 从 Windows 运行 Linux 脚本时如何抑制提示?

我编写了以下 VBScript 以便使用该plink.exe工具从 Windows 运行 Linux 脚本。

用户 - root1,密码 - adhdh

我的 VB 脚本:

但是问题不大

当我第一次运行这个脚本时,我得到以下提示plink

将密钥存储在缓存中?(是/否)

因此,为了通过添加来解决此问题,echo y我将脚本中的行更改如下:

但是在我运行新脚本后,它失败并出现以下错误:

预期的语句结束

我也试过

但我仍然得到其他错误。

请建议我需要在脚本中更改什么?

0 投票
2 回答
994 浏览

java - 用 jar 包 plink

我编写了一个代码(使用 eclipse Juno 的 Java),它使用 plink(C:安装)连接到远程服务器。

无论如何我可以安全地将它与 jar 文件一起导出(putty/plink)。这样就不需要单独安装了。我还必须更改代码以在本地调用 plink。

谢谢。

0 投票
1 回答
2337 浏览

python - windows命令行上plink中的管道命令

我正在使用 Python 在 linux 机器上自动安装 rpm。我使用 plink 连接到 linux 盒子。首先,我需要获取已在盒子上安装的某些 rpm 的信息。为此,我是命令

此处命令行解释'|'为 cmd 命令并抛出错误“grep 未被识别为内部或外部命令、可运行程序或批处理文件”

也是rpm.txt在我的机器上而不是在 linux 机器上创建的。

无论如何,我可以使用'|'并且还确保'rmp.txt'在 linux 框中创建?