Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
4
Newest
 Student
Impact
~3k people reached

  • 0 posts edited
  • 0 helpful flags
  • 12 votes cast
Jul
3
comment SSH + Sudo + Expect in Bash script: Run command with sudo in remote machine
It turns out that the brackets in the \"[sudo]\" option were messing it up. I finally got it working with the spawn area looking like: spawn /usr/bin/ssh -t zignage@$remoteMachine \"/usr/bin/sudo /usr/bin/dpkg -i /home/zignage/Documents/$debToInstall\" and scaping the braces in sudo (\"\[sudo\]\")