linux - How to write a multi-line shell script -
i have remote machine want replace contents of file.
i using following commands
ssh abc@host abc sed -i s/enable=false/enable=true/g /config/pqr.properties
where abc username , password.
how put in shell script?
the bad way:
to write expect
script feed password ssh.
the right way:
to generate key ssh , authorization via ssh key. command like:
ssh abc@host 'sed -i s/enable=false/enable=true/g /config/pqr.properties'
Comments
Post a Comment