Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I'm trying to schedule a script hosted on a linux machine from a windows server, using ssh. I generated the keys and accomplished all the stuff related. Then I wrote a batch on Windows where I put the ssh command to remotely lounch the script on linux. When I manually lounch that batch from Windows, all works fine. But if I logout and try to schedule the execution of the same batch, it doesn't work. It seem (I only guess, but I'm not shure) ssh is not able to authenticate (note that I put attention in executing and scheduling the batch with the proper, and same, user). Neither I'm able to obtain a log by redirecting the output of the batch in a file. The file is created but empty.
Any idea?
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
Bit confused about your question but sounds like you may need to use an addtional app that has the keys ready for the next login. Check out ssh-agent and see if that helps.
Hi,
finally I solved the problem.
Just to be clear, my problem was to schedule a shall script from another host. Doesn't matter what the script do, whatever it do, the failure wasn't it does not work properly, but that it is not launched from remote, it does not start because the remote scheduler don't succeed to authenticate with ssh. I'know I could schedule it locally, but my need is to schedule it remotely by another application (CA unicenter TNG).
Well, I found the problem, and it was in the DOS batch.
When I manually launch the batch, it authenticates because I'm logged in, and ssh can read the environment variables that say it where find it's key. When I schedule it, also if I schedule the execution with the same user I use to login, for some reason ssh does not succeed to read his variables.
I don't know why, but the problem was this:
I set te variables in the batch using commands like
SET HOME=C:\docume~1\"home of the user"
SET HOMEPATH=C:\docume~1\"home of the user"
SET USERNAME="name of the user"
ssh.exe ......
Someone told me to write this way instead:
@SET HOME=C:\docume~1\"home of the user"
@SET HOMEPATH=C:\docume~1\"home of the user"
@SET USERNAME="name of the user"
ssh.exe ......
Note the "@" symbol before the "SET"
I don't really know what it means in DOS but work!!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.