通过Putty自动连接到SuperMicro IPMI的ssh串行连接

我最近发现了关于如何利用SuperMicro串口远程控制台通过SSH的说明。 挑战是SSHlogin后必须执行一些命令来启动远程控制台。 由于我无法在BMC中进行任何更改或创build服务器端脚本 – 我需要手动执行这些命令。

login后所需的命令是:

cd system1/sol1 start 

那么…有没有一种方法可以通过Putty或Plink实现自动化?

看来你想在PuTTY会话属性中input以下内容,即Configuration> SSH> Remote Command:

 cd system/sol1 && start && /bin/bash 

(或者用最喜欢的shell或者命令来替代)。

你有没有尝试创build一个包含命令的本地文件,并使用-m选项启动与plink的连接?

-m:从文件读取远程命令或脚本

  The `-m' option performs a similar function to the `Remote command' box in the SSH panel of the PuTTY configuration box (see section 4.18.1). However, the `-m' option expects to be given a local file name, and it will read a command from that file. With some servers (particularly Unix systems), you can even put multiple lines in this file and execute more than one command in sequence, or a whole shell script; but this is arguably an abuse, and cannot be expected to work on all servers. In particular, it is known _not_ to work with certain `embedded' servers, such as Cisco routers.