Re: How can I run ssh command in cron?
- From: Chris Mattern <syscjm@xxxxxxxxxxxxxx>
- Date: Tue, 26 Feb 2008 21:45:38 -0000
On 2008-02-24, Sailer <sailer.shen@xxxxxxxxx> wrote:
On 2??22??, ????6??02??, Adrian Ball <ab.use...@xxxxxxxxxxxxx> wrote:
On Thu, 21 Feb 2008 22:28:16 -0800, Sailer wrote:
On 2??17??, ????6??24??, Barry Margolin <bar...@xxxxxxxxxxxx> wrote:
In article
<SNIP>
But it looks the command not be run, I don't know and how to run
it in crontab?
<SNIP>
I receive a mail from system.
Content-Type: text/plain; charset=UTF-8 Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: remote port forwarding failed for listen port 1234
Try ssh -n (see man ssh) - this should attempt to run the command without
attempting to allocate a tty.
HTH,
Ade.
--
Adrian Ballhttp://www.majords.co.uk/
Do not use spam-trap ab.usenet address - please use:-
ade at majords . co . uk
I have not command to run,I just want to login remote ssh server, so I
cannot use -n. When I run "/usr/bin/ssh -R 1234:localhost:22 -l root
192.168.1.1 -n", it said:
Pseudo-terminal will not be allocated because stdin is not a terminal.
The flag you want is -N, which prevents ssh from trying to run any
remote command at all. It's intended specifically for sessions that
are only setting up port forwarding, just like you're doing here.
--
Christopher Mattern
NOTICE
Thank you for noticing this new notice
Your noticing it has been noted
And will be reported to the authorities
.
- References:
- How can I run ssh command in cron?
- From: Sailer
- Re: How can I run ssh command in cron?
- From: Bill Marcum
- Re: How can I run ssh command in cron?
- From: Sailer
- Re: How can I run ssh command in cron?
- From: Barry Margolin
- Re: How can I run ssh command in cron?
- From: Sailer
- Re: How can I run ssh command in cron?
- From: Adrian Ball
- Re: How can I run ssh command in cron?
- From: Sailer
- How can I run ssh command in cron?
- Prev by Date: Re: Fast way to modify all softlinks under a directory???
- Next by Date: Re: Remove last word in a file
- Previous by thread: Re: How can I run ssh command in cron?
- Next by thread: Re: How can I run ssh command in cron?
- Index(es):
Relevant Pages
|