So I need to login as a lot of different users to a server using ssh and I'm tired of copying the password from the files, which contain the passwords for the users, each time. I can't change it to not use passwords, it's not mine, it's for a game.
I've tried using :
$ cat /path/to/myfile | ssh user@localhost
I get a message saying pseudo-terminal will not be allocated because stdin is not a terminal.
I'm not really sure how it should work.
expector something like that if you don't want to usesshpasswhich is the tool created for doing the task you described – Eric Renouf Aug 16 '15 at 12:29echo hi | ssh host 'cat'so at minimum you'll need to experiment with the-fflag to SSH but reallyexpectorsshpassor hacking away at the SSH source code are the viable options here. – thrig Aug 16 '15 at 15:23