简体   繁体   English

选址键在crontab中不起作用

[英]Pageant keys not working in crontab

I understand the issue but not sure how to fix it :( 我知道这个问题,但不确定如何解决:(

Problem Story: I've installed pageant in my windows10 and added ssh keys(keys generated through puttygen) into it. 问题故事:我已在Windows10中安装了pageant,并向其中添加了ssh密钥(通过puttygen生成的密钥)。 configured putty session in windows10 with agent forwarding to access the servers(linux) with out using typing/credentials. 在Windows10中配置了腻子会话,代理转发无需使用键入/凭据即可访问服务器(linux)。

whenever I open putty session to login to any server, putty talks to the pageant and load/used my credentials without my involvement to enter credentials,. 每当我打开腻子会话以登录到任何服务器时,腻子都会与选区进行对话并加载/使用我的凭据,而无需我参与输入凭据。 keys deployed to all over servers when I do ssh form one server to another server the pageant works fine and able to access,no issue at all untill paegent inactive....I'm happy till this part 当我从ssh形成一个服务器到另一台服务器时,已部署到所有服务器的密钥,选址工作正常并且能够访问,直到paegent不活动才根本没有问题。

when i use ssh in cron auto job, it unable to calls the keys from linux to pageant(win10). 当我在cron auto job中使用ssh时,它无法从linux调用key到pageant(win10)。

how to make this to run in linux(cron) 如何使它在linux(cron)中运行

Of course not, as the cron does not run in the context of your SSH session. 当然不会,因为cron不会在SSH会话的上下文中运行。

So it cannot talk to local Pageant. 因此,它无法与本地Pageant通信。

Even if the cron knows what user did create the job, how could it know, which of potentially many SSH sessions, you have opened, it should query for the keys? 即使cron知道是由哪个用户创建的,也无法知道您打开了多少个SSH会话中的哪一个,它应该查询密钥? And what, if you actually do not have any SSH session open? 而且,如果您实际上没有打开任何SSH会话,该怎么办? The cron job should work even, when you are not connected to the server. 即使您没有连接到服务器,cron作业也应该可以工作。


You have to have the keys stored on the server, where cron runs. 您必须将密钥存储在运行cron的服务器上。 There's no other way around that. 别无选择。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM