How could I solve this error?

From bash file I run the script to clean server cache.

`ssh -T root@${HLDB_SERVER} "bash -c 'free && sync && echo 3 > /proc/sys/vm/drop_caches && free'"`
echo "Cache is cleaned!"
echo ""

I have got this error

Pseudo-terminal will not be allocated because stdin is not a terminal.

  • Why we you running it in back ticks? – Jeff Schaller Mar 21 '18 at 8:43
  • because I want to run on the remote server with ssh – YAcaCsh Mar 21 '18 at 8:44
  • Yes, I think I should remove it. – YAcaCsh Mar 21 '18 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.