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:
Expand|Select|Wrap|Line Numbers
- $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!