sslug-teknik team mailing list archive
-
sslug-teknik team
-
Mailing list archive
-
Message #94811
RE: bash og ssh
du skal sette en key-exchange op på den maskine du vil ssh til.
(uddrag fra man ssh)
The file ~/.ssh/authorized_keys lists the public keys that are permitted for logging in. When the user logs in, the ssh program tells the server
which key pair it would like to use for authentication. The client proves that it has access to the private key and the server checks that the cor-
responding public key is authorized to accept the account.
The user creates his/her key pair by running ssh-keygen(1). This stores the private key in ~/.ssh/identity (protocol 1), ~/.ssh/id_dsa (protocol 2
DSA), or ~/.ssh/id_rsa (protocol 2 RSA) and stores the public key in ~/.ssh/identity.pub (protocol 1), ~/.ssh/id_dsa.pub (protocol 2 DSA), or
~/.ssh/id_rsa.pub (protocol 2 RSA) in the user’s home directory. The user should then copy the public key to ~/.ssh/authorized_keys in his/her home
directory on the remote machine. The authorized_keys file corresponds to the conventional ~/.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.
jeg har self fået tilsvarende til at virke (var dog sftp, men samme princip da sftp bare er ftp over ssh)
Søren Koch
Udviklingsingeniør
Direkte telefon +45 4677 5816
Mobil
soeren.koch@xxxxxxxx
Afdelingen for Brændselsceller og Faststofkemi
Risø Nationallaboratoriet for Bæredygtig Energi
Danmarks Tekniske Universitet
Bygning 228, Postboks 49, 4000 Roskilde
Tel +45 4677 5800
Fax +45 4677 5858
www.risoe.dtu.dk
Sikker e-post sendes til risoe@xxxxxxxx
> -----Original Message-----
> From: Hans Ole Hansen [mailto:hoh@xxxxxxxxxxx]
> Sent: Tuesday, March 25, 2008 3:31 PM
> To: sslug-teknik@xxxxxxxx
> Subject: [TEKNIK] bash og ssh
>
> Jeg vil lave et bash script der starter en ssh kommando på en
> anden maskine,
> noget lign
>
>
> ssh hoh@xxxxxxxxxxxxx "mkdir backup"
>
>
> Dette skulle lave et direktorie "backup", men hvordan angiver
> jeg password?
> Som det er nu vil scriptet vel bede mig om et password?
>
>
>
>
>
>
Follow ups
References