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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -