Hi
how can I use here doc to use ssh?
I am facing a problem with the below script:
#!/bin/bash
ssh hosein@localhost << *
123456
*
"123456" is my password
Thanks
Hi
how can I use here doc to use ssh?
I am facing a problem with the below script:
#!/bin/bash
ssh hosein@localhost << *
123456
*
"123456" is my password
Thanks
I'm afraid that ssh doesn't work that way.
If you want to do a non-interactive login (ie no password typing), create an ssh authorised key file in ~hosein/.ssh/authorized_keys