0
Is there any way to run the standard Cygwin ssh
command with an alternative $HOME
directory or an alternative .ssh
configuration directory?
UPDATE: it turns out this is a duplicate question; but it hasn't been answered yet.
0
Is there any way to run the standard Cygwin ssh
command with an alternative $HOME
directory or an alternative .ssh
configuration directory?
UPDATE: it turns out this is a duplicate question; but it hasn't been answered yet.
Please explain some more. Why exactly do you need a separate $HOME for cronjobs? What kinds of cronjobs? What would that $HOME be? Can you just run the cron as a different user using
/etc/crontab
? Have you readman ssh
? Won't the-F
and/or-i
options do? – terdon – 2013-10-14T18:39:35.403I've deleted the sentence about the cron jobs. Sorry about that. Please just consider the problem as stated. BTW, a first glance at the source code in
ssh.c
doesn't leave much hope. – reinierpost – 2013-10-14T18:41:54.753Could you also answer my other questions? If this is about cron there are probably better ways of doing it but why not use the
-F
and-i
options? What exactly are you trying to do? – terdon – 2013-10-14T18:46:50.833One question at a time. I was trying to avoid the real question because it takes about 4 paragraphs to explain and people will start picking on all the things I don't mean to ask. – reinierpost – 2013-10-14T18:47:44.170
I think it's cleanest to close this question (although I would really like to know the answer, looks like my only option is to compile ssh from source); I'll try to ask the other question in a second attempt. Thank you. – reinierpost – 2013-10-14T18:49:53.647
OK, but my guess is you are trying to copy things in which case
rsync
can do it or that you need a specific identity keyfile in which case the-i
option would do it or a specific config file in which case the-F
option would do it. Suit yourself though. – terdon – 2013-10-14T18:51:11.623Yes,
rsync
is what I want to use this for. – reinierpost – 2013-10-14T18:52:57.753Then post a question asking about that or read
man rsync
it has various options for ssh identities. – terdon – 2013-10-14T19:02:53.857The problem is that my
$HOME
is on a network drive, whichssh
can deal with just fine, except when running fromcron
. – reinierpost – 2013-10-14T19:11:18.207Please post a question explaining the situation. You might be able to fix it by specifying a different shell for
cron
or by manually mounting the drive in the crontab or by various options. – terdon – 2013-10-14T19:17:31.727let us continue this discussion in chat
– reinierpost – 2013-10-14T19:35:51.833I solved the problem by writing a wrapper script that actually changes the user's
$HOME
(it's a symlink), executes the wrapped command, then changes it back; and using that in mycron
job. It's a hack but it will do. – reinierpost – 2013-10-30T09:41:20.337Nice! Could you write that up as an answer and accept it? – terdon – 2013-10-30T12:12:26.660
It isn't an answer; it's a workaround to the lack of an answer. – reinierpost – 2013-10-30T15:59:23.910