LINUX.ORG.RU
ФорумAdmin

помогите по SSH


0

0

есть comp1 и comp2 ssh 3.2.3

необходимо чтобы comp2 заходил на comp1 и запускал там прогу...

делал key-gen -P (без passphrase) все равно дает приглашение для ввода пароля... :(

у кого есть обяснение по пунктам как сделать... поделитесь пожалуйста.... сам делал по:

[code]To make sure that public key authentication is enabled, the AllowedAuthentications field both in /etc/ssh2/sshd2_config file on Remote and in /etc/ssh2/ssh2_config file on Local should contain the word publickey: AllowedAuthentications publickey Other authentication methods can be listed in the configuration file as well. 1. Create a keypair by executing ssh-keygen (ssh-keygen2) on Local. Local> ssh-keygen Generating 1024-bit dsa key pair 1 oOo.oOo.o Key generated. 1024-bit dsa, user@Local, Wed Mar 22 2000 00:13:43 +0200 Passphrase : Again : Private key saved to /home/user/.ssh2/id_dsa_1024_a Public key saved to /home/user/.ssh2/id_dsa_1024_a.pub Ssh-keygen will ask you for a passphrase for the new key. Enter a sufficiently long (20 characters or so) sequence of any characters (white spaces are OK). Ssh-keygen creates a .ssh2 directory in your home directory, and stores your new authentication key pair in two separate files. One is your private key which must NEVER be made available to anyone but yourself. The private key can only be used together with the passphrase. In the above example, the private key file is id_dsa_1024_a. The other file id_dsa_1024_a.pub is your public key, which can be distributed to other computers. 2. Create an identification file in your ~/.ssh2 directory on Local. Local> cd ~/.ssh2 Local> echo "IdKey id_dsa_1024_a" > identification You now have an identification file which consists of one line that denotes the file containing your identification (your private key). For special applications, you can create multiple identifications by executing ssh-keygen again. This is, however, not needed in the most common cases. 3. Copy your public key (id_dsa_1024_a.pub) to the ~/.ssh2 directory on Remote. 4. Create an authorization file in your ~/.ssh2 directory on Remote. Add the following line to authorization: Key id_dsa_1024_a.pub This directs the SSH server to use id_dsa_1024_a.pub as a valid public key when authorizing your login. If you want to login to Remote from other hosts, create authorization keys on the hosts (steps 1 and 2) and repeat steps 3 and 4 on Remote. 5. Now you should be able to login to Remote from Local using Secure Shell. Try to login: Local>ssh Remote Passphrase for key "/home/user/.ssh2/id_dsa_1024_a with comment "1024-bit dsa, created by user@Local Wed Mar 22 2000 00:13:43 +0200": After you have entered the passphrase of your private key, a Secure Shell connection will be established. [/code]

не пашет :(


man ssh-agent

anonymous
()

сделай ssh -v и посмотри - обычно видно сразу. если нет - добавь еще -vv и посмотри опять. скорее всего, ты не туда ключи положил или права на файл неправильные

ivlad ★★★★★
()

Бился с аналогичной фигней.
Все решилось после:
1. копирования на удаленную машину (куда заходишь) в /home/пользователь/.ssh/authorized_keys своего identity.pub
2. установкой правильных прав для .ssh/authorized_keys
(что-то вроде go-rwx)
3. Копирования identity.pub в свой домашний каталог на своей машине (тот, который в HOME)
Потрахался с этим часа 4.
Если что - звони 132742420

mst_72
()

На машине, с которой ходишь для данного юзверя надо сделать ключи (если еще не сделаны) (для SSH2):
ssh-keygen -t rsa от имени этого юзверя.
В его домашнем каталоге смотрим файл ~/.ssh/id_rsa.pub
Содержимое этого файла добавляешь в файл ~/.ssh/authorized_keys в домашнем каталоге того же пользователя на машине, на которую надо заходить. (у меня права на него 0644)
В /etc/ssh/sshd_config должны быть разрешены:
RSAAuthentication yes
PubkeyAuthentication yes
Все, должно работать.
Естественно, что при первом заходе спросит о добавлении сервера в ~/.ssh/known_hosts

Gelin
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.