zadni hesla ve skriptu
Kilian Igor
igor.kilian na infogas.sk
Úterý Srpen 28 07:26:22 CEST 2001
> Dobry den,
>
> potrebuji v jednom skriptu zautomatizovat zadani hesla.
> Lze vytvorit ve
> skriptu odpoved na vyzvu 'Password:', je asi jedno jestli je
> to v pripade
> 'su', 'ssh', 'scp', atd. ???
Uplne jedno to zas nie je. Ja osobne pouzivam ssh. Treba vygenerovat
kluc na masine z ktorej sa hlasim, prekopirovat ho do
$HOME/.ssh/authorized_keys
a potom netreba zadavat ziadne heslo. Pozri manual k ssh. To hlavne z neho:
ssh implements the RSA authentication protocol automatically. The user
creates his/her RSA key pair by running ssh-keygen(1). This stores the
private key in $HOME/.ssh/identity and the public key in
$HOME/.ssh/identity.pub in the user's home directory. The user should
then copy the identity.pub to $HOME/.ssh/authorized_keys in his/her
home
directory on the remote machine (the authorized_keys file corresponds
to
the conventional $HOME/.rhosts file, and has one key per line, though
the
lines can be very long). After this, the user can log in without
giving
the password. RSA authentication is much more secure than rhosts
authen
tication.
Další informace o konferenci Linux