Bash script does not ssh all the entries of a csv file

前端 未结 3 1233
走了就别回头了
走了就别回头了 2020-12-21 18:12

I am trying to patch a bunch of CENT OS machines with the latest fix pack. I have the below bash script that takes csv file as a input which has the ip address and password

相关标签:
3条回答
  • 2020-12-21 18:40

    You can pass ssh another -t to force pty allocation:

    ssh -t -t
    
    0 讨论(0)
  • 2020-12-21 18:42

    Add at the end of your sshpass command </dev/null.

    0 讨论(0)
  • 2020-12-21 18:58
    1. Add Defaults:username !requiretty to your /etc/sudoers config
    2. Get rid of -t from your ssh command
    3. Optional, but recommended: set up public key auth so you don't have your passwords lying around in text files.
    0 讨论(0)
提交回复
热议问题