Re: [Asterisk-Users] SSH from System() ?...

2006-05-07 Thread Tzafrir Cohen
On Mon, May 08, 2006 at 12:40:55AM +0200, Francesco Peeters wrote:
> Hi,
> 
> I would like to execute a command on a different system using ssh.
> 
> When I execute the command from the CLI on the asterisk machine, it 
> works fine (I set up RSA keys on both sides)
> 
> When I execute the same command from System() inside the dialplan, the 
> log shows it is being executed, and a session is established, but the 
> remote host never receives the command.
> 
> I *think* it has to do with the command shell environment in which the 
> system command is opened...
> 
> Any suggestions on how to set this up would be appreciated...

My guess is that the host key is not in the known_hosts file for the
user asterisk . Add it manually (just copy the line from your file, or
your whole file) and see if it helps.

-- Tzafrir
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] SSH from System() ?...

2006-05-07 Thread Francesco Peeters

Francesco Peeters schreef:

Hi,

I would like to execute a command on a different system using ssh.

When I execute the command from the CLI on the asterisk machine, it 
works fine (I set up RSA keys on both sides)


When I execute the same command from System() inside the dialplan, the 
log shows it is being executed, and a session is established, but the 
remote host never receives the command.


I *think* it has to do with the command shell environment in which the 
system command is opened...


Any suggestions on how to set this up would be appreciated...

Never mind, I had wrong permissions on the authorized_keys file on the 
target machine!


--
Francesco Peeters
  PIII-450, 512 MB, 2x HFC-PCI, BRIstuff & Florz patch
  AMD Duron 1GHz, 512 MB, 2x HFC-PCI, vISDN
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] SSH from System() ?...

2006-05-07 Thread Francesco Peeters

Hi,

I would like to execute a command on a different system using ssh.

When I execute the command from the CLI on the asterisk machine, it 
works fine (I set up RSA keys on both sides)


When I execute the same command from System() inside the dialplan, the 
log shows it is being executed, and a session is established, but the 
remote host never receives the command.


I *think* it has to do with the command shell environment in which the 
system command is opened...


Any suggestions on how to set this up would be appreciated...

--
Francesco Peeters
  PIII-450, 512 MB, 2x HFC-PCI, BRIstuff & Florz patch
  AMD Duron 1GHz, 512 MB, 2x HFC-PCI, vISDN

___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users