Hello.
In an SSH connection, how can I write a bash script that enter the password automatically? I don't like to use a tool like "expect".
Thanks.
Write a bash script for enter SSH password automatically.
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Write a bash script for enter SSH password automatically.
Why not using a key?
Anyway... This is a bad practice, as anyone can see the pass via 'strings'.
If you really insist:
Anyway... This is a bad practice, as anyone can see the pass via 'strings'.
If you really insist:
Code: Select all
echo mypass | ssh root@some.evil.place
Re: Write a bash script for enter SSH password automatically.
That is what ssh keys are for.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Write a bash script for enter SSH password automatically.
You could do it with the expect stuff, but yeah, don't.