Jul 16, 2008, 8:16 AM
Post #1 of 5
Trying to use Net::SSH::Expect
I am trying to use Net::SSH::Expect.
Basically I had success login into a remote server using this module.
The thing is i think i have a syntax problem...
I am logging into a remote server using ssh and trying to edit a file so this is waht i do:
$ssh->exec("sed 's/\/user/\#\/user/' /etc/auto.master > /etc/auto.master.new");
$ssh->exec("rm -fr /etc/auto.master");
$ssh->exec("mv /etc/auto.master.new /etc/auto.master");
for some reason the first line (sed) fails, and i don't know why,,,
Any one has an idea??