Hi,
I am trying to use Net::SSH::Expec t.
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:
for some reason the first line (sed) fails, and i don't know why,,,
Any one has an idea??
Thanks!
I am trying to use Net::SSH::Expec t.
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:
Code:
$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");
Any one has an idea??
Thanks!
Comment