automatischer ssh-login ohne key-exchange
Hello list, 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.) Thanks for any hints, Andreas Wagner -- Linux: Because rebooting is for adding new hardware. -- My Public PGP Keys: 1024 Bit DH/DSS: 0x869F81BA 768 Bit RSA: 0x1AD97BA5
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. 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 ;-) Gruß Christian Boltz -- The nice thing about Windows is - It does not just crash, it displays a dialog box and lets you press 'OK' first.
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
participants (2)
-
Andreas Wagner
-
Christian Boltz