I try to pass sed via ssh command as [1] to ssh command, but it does not work. I do ssh to a host, like 'ssh ld3646'. In my console, I input
ssh ld3646 'sed -i 's/USE_KERNEL_NFSD_NUMBER="4"/USE_KERNEL_NFSD_NUMBER="64"/g' /etc/sysconfig/nfs'
file /etc/sysconfig/nfs is not changed at all. It works when I do 'ssh ld3646' and type
sed -i 's/USE_KERNEL_NFSD_NUMBER="4"/USE_KERNEL_NFSD_NUMBER="64"/g' /etc/sysconfig/nfs'
Can someone help on why doesn't it work?