Hello Christian, hello list, * Christian Boltz wrote on Jun/11/2004:
Hello,
Am Freitag, 4. Juni 2004 10:00 schrieb Andreas Wagner:
is somebody aware of a way to automate a ssh-login (script-wise or via another application) when the remote sshd doesn't provide key-based authentication? I want to do automated downloads via sftp, but the ftp servers sshd keeps asking for my password... (But then, it's not so vital to have it automated, it would just be nice.)
Have a look at expect and autoexpect (and their man pages). Disadvantage: You have to write the password in cleartext in a scriptfile on your harddisk.
Thanks a lot for the hint. I figured out how to do it with an expect script. Now I'm sure I'll be finding a solution for restricting access to that script as well.
BTW: Are you able to upload files to the server? Then it would be worth a try to upload a .ssh/authorized_keys file to your home directory ;-)
I *did* try that. The problem was that while I could log into the telnet server, the (s)ftp server that hosts the file I want to download mirrors my homedir with all the necessary stuff, but is not set up to allow for key-based authentication. And is not going to be so for a while, the admin told me.
Gruß
Christian Boltz
Thanks a lot again. This has been on my mind for quite some time now. Gruß, Andreas Wagner -- My Public PGP Key: 1024 Bit DH/DSS: 0x869F81BA