Редкий гость
Сообщения: 1769
Благодарности: 16
|
Профиль
|
Сайт
|
Отправить PM
| Цитировать
Вобщем, вот каталог .ssh с пермишнами:
[pre]drwxr-xr-x 2 porky porky 512 Feb 24 22:17 .
drwxr-xr-x 5 user group 512 Jun 3 23:17 ..
-rw-r--r-- 1 user group 2243 Feb 3 10:56 authorized_keys
-rw-r--r-- 1 user group 603 Feb 24 22:17 known_hosts[/pre]
Во первых, у тебя должен быть запущен какой-нить агент (во Фре у меня это просто ssh-agent, в Винде - SSH Accession Lite), который хранит и парсит запчасти от приватного ключа, на стороне клиента (с которого подключаешься). На стороне сервера (к которому подключаешься), в файле authorized_keys (хотя ты могешь поменять его имя в файле конфига sshd) в каждой отдельной строчке должны храниться публичные ключи каждой клиентской машины, с которой ты подключаешься. Кстати, вот мой конфиг:
[pre]# Port 22
Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::
ListenAddress <host_IP>:<host_port>
# HostKey for protocol version 1
HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 2048
# Logging
#obsoletes QuietMode and FascistLogging
SyslogFacility AUTH
LogLevel DEBUG
# Authentication:
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
# RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
# rhosts authentication should not be used
RhostsAuthentication no
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no
# Change to no to disable PAM authentication
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#AFSTokenPassing no
# Kerberos TGT Passing only works with the AFS kaserver
#KerberosTgtPassing no
#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
PrintLastLog yes
KeepAlive yes
#UseLogin no
UsePrivilegeSeparation yes
Compression yes
#MaxStartups 10
# no default banner path
#Banner /some/path
#VerifyReverseMapping no
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server[/pre]
Добавлено:
У меня идёт работа по ssh2 (DSA-ключи, генерятся по ssh-keygen -t dsa -b 2048 - число бит можно и меньше сделать).
|
-------
Жизнь - цепь, а мелочи - в ней звенья. Нельзя звену не придавать значения.(C) 80 дней вокруг света
---
Це все, що маю я... (С) Друга ріка
Отправлено: 15:09, 12-06-2003
| #4
|