Hacker News new | past | comments | ask | show | jobs | submit login

  Do not use SSH with Expect.
  Do not use them here or there.
  You will not use them anywhere.
Not just because of how much expect sucks: SSH tools leave out a --password option for a reason! Use passphrase-less RSA keys with a restricted account.



Also, because expect(1) defeats the entire "remote shell" aspect of SSH, which lets me do this from my workstation:

  ssh server tar zc /srv/http > http-backup.tar.gz
Yes, that's a remote command whose output is piped to a local file. With imagination, ssh, and shell-fu, one can get very far with backup automation and testing.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: