autossh -M 10984 -v -o "PubkeyAuthentication=yes" -o "PasswordAuthentication=no" -R 6889:localhost:22 user@rpi.local上面的命令起作用。下面的那个没有。
autossh -M 10984 -E /home/pi/ssh.log -v -o "PubkeyAuthentication=yes" -o "PasswordAuthentication=no" -R 6889:localhost:22 user@rpi.local上面写着,
/usr/lib/autossh/autossh: invalid option -- 'E'`当将日志文件传递给autossh时,如何将其指定为SSH选项?
发布于 2016-11-14 14:54:31
这是autossh的一个限制。autossh源代码包含程序接受的命令行开关列表.清单显然应该包括所有ssh选项,但不包括"E":
#define OPTION_STRING "M:V1246ab:c:e:fgi:kl:m:no:p:qstvw:xyACD:F:I:MKL:NO:PR:S:TVXY"
...
/*
* We accept all ssh args, and quietly pass them on
* to ssh when we call it.
*/
while ((ch = getopt(argc, argv, OPTION_STRING)) != -1) {
switch(ch) {
case 'M':
...目前看来有几个解决办法:
https://stackoverflow.com/questions/40567017
复制相似问题