|
|
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
Добрый день! Тема избита, но никак между двумя серверами на Solaris постоить сабж не получается. мой порядок действий: на сервере-клиенте генерирую rsa ключ: Код: plaintext копирую содержимое файла ~/.ssh/id_rsa.pub на сервер, куда собираюсь ходить без пароля, в файл ~/.ssh/authorized_keys настройки sshd_config на сервере: # # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)sshd_config 1.8 04/05/10 SMI" # # Configuration file for sshd(1m) # Protocol versions supported # # The sshd shipped in this release of Solaris has support for major versions # 1 and 2. It is recommended due to security weaknesses in the v1 protocol # that sites run only v2 if possible. Support for v1 is provided to help sites # with existing ssh v1 clients/servers to transition. # Support for v1 may not be available in a future release of Solaris. # # To enable support for v1 an RSA1 key must be created with ssh-keygen(1). # RSA and DSA keys for protocol v2 are created by /etc/init.d/sshd if they # do not already exist, RSA1 keys for protocol v1 are not automatically created. # Uncomment ONLY ONE of the following Protocol statements. # Only v2 (recommended) Protocol 2 # Both v1 and v2 (not recommended) #Protocol 2,1 # Only v1 (not recommended) #Protocol 1 # Listen port (the IANA registered port number for ssh is 22) Port 22 # The default listen address is all interfaces, this may need to be changed # if you wish to restrict the interfaces sshd listens on for a multi homed host. # Multiple ListenAddress entries are allowed. # IPv4 only #ListenAddress 0.0.0.0 # IPv4 & IPv6 ListenAddress :: # Port forwarding AllowTcpForwarding no # If port forwarding is enabled, specify if the server can bind to INADDR_ANY. # This allows the local port forwarding to work when connections are received # from any remote host. GatewayPorts no # X11 tunneling options X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes # The maximum number of concurrent unauthenticated connections to sshd. # start:rate:full see sshd(1) for more information. # The default is 10 unauthenticated clients. #MaxStartups 10:30:60 # Banner to be printed before authentication starts. #Banner /etc/issue # Should sshd print the /etc/motd file and check for mail. # On Solaris it is assumed that the login shell will do these (eg /etc/profile). PrintMotd no # KeepAlive specifies whether keep alive messages are sent to the client. # See sshd(1) for detailed description of what this means. # Note that the client may also be sending keep alive messages to the server. KeepAlive yes # Syslog facility and level SyslogFacility auth LogLevel info # # Authentication configuration # # Host private key files # Must be on a local disk and readable only by the root user (root:sys 600). HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key # Default Encryption algorithms and Message Authentication codes #Ciphers aes128-ctr,aes128-cbc,arcfour,3des-cbc,blowfish-cbc #MACS hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96 # Length of the server key # Default 768, Minimum 512 ServerKeyBits 768 # sshd regenerates the key every KeyRegenerationInterval seconds. # The key is never stored anywhere except the memory of sshd. # The default is 1 hour (3600 seconds). KeyRegenerationInterval 3600 # Ensure secure permissions on users .ssh directory. StrictModes yes # Length of time in seconds before a client that hasn't completed # authentication is disconnected. # Default is 600 seconds. 0 means no time limit. LoginGraceTime 600 # Maximum number of retries for authentication # Default is 6. Default (if unset) for MaxAuthTriesLog is MaxAuthTries / 2 MaxAuthTries 6 MaxAuthTriesLog 3 # Are logins to accounts with empty passwords allowed. # If PermitEmptyPasswords is no, pass PAM_DISALLOW_NULL_AUTHTOK # to pam_authenticate(3PAM). PermitEmptyPasswords no # To disable tunneled clear text passwords, change PasswordAuthentication to no. PasswordAuthentication yes # Use PAM via keyboard interactive method for authentication. # Depending on the setup of pam.conf(4) this may allow tunneled clear text # passwords even when PasswordAuthentication is set to no. This is dependent # on what the individual modules request and is out of the control of sshd # or the protocol. PAMAuthenticationViaKBDInt yes # Are root logins permitted using sshd. # Note that sshd uses pam_authenticate(3PAM) so the root (or any other) user # maybe denied access by a PAM module regardless of this setting. # Valid options are yes, without-password, no. PermitRootLogin no # sftp subsystem Subsystem sftp /usr/lib/ssh/sftp-server # SSH protocol v1 specific options # # The following options only apply to the v1 protocol and provide # some form of backwards compatibility with the very weak security # of /usr/bin/rsh. Their use is not recommended and the functionality # will be removed when support for v1 protocol is removed. # Should sshd use .rhosts and .shosts for password less authentication. IgnoreRhosts yes RhostsAuthentication no # Rhosts RSA Authentication # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts. # If the user on the client side is not root then this won't work on # Solaris since /usr/bin/ssh is not installed setuid. RhostsRSAAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication. #IgnoreUserKnownHosts yes # Is pure RSA authentication allowed. # Default is yes RSAAuthentication yes IdentityFile ~/.ssh/id_rsa ssh -d на сервер выдает следующее: Sun_SSH_1.1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f debug1: Reading configuration data /etc/ssh/ssh_config debug1: Rhosts Authentication disabled, originating port will not be trusted. debug1: ssh_connect: needpriv 0 debug1: Connecting to 10.2.133.85 [10.2.133.85] port 22. debug1: Connection established. debug1: identity file /export/home/ftpuser/.ssh/identity type -1 debug1: identity file /export/home/ftpuser/.ssh/id_rsa type 1 debug1: identity file /export/home/ftpuser/.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version Sun_SSH_1.1 debug1: match: Sun_SSH_1.1 pat Sun_SSH_1.1* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-Sun_SSH_1.1.1 debug1: use_engine is 'yes' debug1: pkcs11 engine initialized, now setting it as default for RSA, DSA, and symmetric ciphers debug1: pkcs11 engine initialization complete debug1: Failed to acquire GSS-API credentials for any mechanisms (No credentials were supplied, or the credentials were unavailable or inaccessible Unknown code 0 ) debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: Peer sent proposed langtags, ctos: i-default debug1: Peer sent proposed langtags, stoc: i-default debug1: We proposed langtags, ctos: i-default debug1: We proposed langtags, stoc: i-default debug1: Negotiated lang: i-default debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: Remote: Negotiated main locale: C debug1: Remote: Negotiated messages locale: C debug1: dh_gen_key: priv key bits set: 137/256 debug1: bits set: 1554/3191 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host '10.2.133.85' is known and matches the RSA host key. debug1: Found key in /export/home/ftpuser/.ssh/known_hosts:3 debug1: bits set: 1601/3191 debug1: ssh_rsa_verify: signature correct debug1: newkeys: mode 1 debug1: set_newkeys: setting new keys for 'out' mode debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: newkeys: mode 0 debug1: set_newkeys: setting new keys for 'in' mode debug1: SSH2_MSG_NEWKEYS received debug1: done: ssh_kex2. debug1: send SSH2_MSG_SERVICE_REQUEST debug1: got SSH2_MSG_SERVICE_ACCEPT debug1: Authentications that can continue: gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive debug1: Next authentication method: gssapi-keyex debug1: Next authentication method: gssapi-with-mic debug1: Failed to acquire GSS-API credentials for any mechanisms (No credentials were supplied, or the credentials were unavailable or inaccessible Unknown code 0 ) debug1: Next authentication method: publickey debug1: Trying private key: /export/home/ftpuser/.ssh/identity debug1: Trying public key: /export/home/ftpuser/.ssh/id_rsa debug1: Authentications that can continue: gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive debug1: Trying private key: /export/home/ftpuser/.ssh/id_dsa debug1: Next authentication method: keyboard-interactive Password: debug1: Authentication succeeded (keyboard-interactive) debug1: channel 0: new [client-session] debug1: send channel open 0 debug1: Entering interactive session. debug1: ssh_session2_setup: id 0 debug1: channel request 0: pty-req debug1: channel request 0: shell debug1: fd 4 setting TCP_NODELAY debug1: channel 0: open confirm rwindow 0 rmax 32768 Last login: Fri Nov 6 10:14:07 2009 from 10.2.150.209 Sun Microsystems Inc. SunOS 5.10 Generic January 2005 -bash-3.00$ в sun-доке еще написано про ssh-agent, но что с ним, что без него не получается, есть мнения, почему? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 10:17 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
дополню, что на соседний серврер с ubunty доступ работает корректно... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 10:20 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
PubkeyAuthentication yes ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 11:55 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
IdentityFile ~/.ssh/authorized_keys и так наверное под ключи... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 12:00 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
chmod 0755 ~/.ssh chmod 0644 ~/.ssh/authorized_keys Ну и проверить что никакой идиот не поставил ssh.com вместо штатного на этот соларез. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 13:10 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
майор скрытность Ну и проверить что никакой идиот не поставил ssh.com вместо штатного на этот соларез. # # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)sshd_config 1.8 04/05/10 SMI" майор, это не показатель ??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 13:37 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
это ничего не значит, поскольку ssh.com кладёт свои конфиги в /etc/ssh2 :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 15:37 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
майор скрытностьэто ничего не значит, поскольку ssh.com кладёт свои конфиги в /etc/ssh2 :) хорошо, возможно и кладёт... продукт называется "SSH Tectia Client/Server" в системе врядли он будет виден как sshd....или я ошибаюсь...? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 15:47 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
PubkeyAuthentication yes не помог (он в yes по умолчанию), значение параметра IdentityFile ~/.ssh/authorized_keys для версии ssh 1, у меня v 2... chmod 0755 ~/.ssh chmod 0644 ~/.ssh/authorized_keys не помогает... я не понимаю, почему в дебаг моде сервер пишет: debug1: Next authentication method: publickey debug1: Trying private key: /export/home/ftpuser/.ssh/identity debug1: Trying public key: /export/home/ftpuser/.ssh/id_rsa ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 16:29 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
fabler, может надо Pam_sshd смотреть? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 16:35 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
в частности секцию "auth" ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 16:36 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
Learning_Oracle, UsePAM yes у меня на rpm-base Linux ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 16:39 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
параметра UsePAM нет, если я правильно читаю доку... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.11.2009, 16:52 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
все еще актуально ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 09.11.2009, 12:12 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
если в конф. файл добавить строку Код: plaintext то ssh вообще не стартует со следующей ошибкой (/var/svc/log/network-ssh:default.log): Код: plaintext 1. 2. 3. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.11.2009, 22:35 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.11.2009, 21:08 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
andrey_anonymous, -bash-3.00$ uname -a SunOS isystem 5.10 Generic_139556-08 i86pc i386 i86pc -bash-3.00$ id uid=1111(ftpuser) gid=1(other) -bash-3.00$ ssh Server Password: Last login: Thu Nov 12 11:26:56 2009 from Client Sun Microsystems Inc. SunOS 5.10 Generic January 2005 -bash-3.00$ id uid=2001(ftpuser) gid=301(ftpusers) -bash-3.00$ ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2009, 11:29 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
fablerandrey_anonymous, Я спрашивал - что Вам рассказать о беспарольном ssh :) Делал давно уже, подробности немного стерлись из памяти. Один момент точно отличается - у меня сгенерированы и разложены в authorized_keys оба вида ключей. Не помню почему, но под oracle кластерварь надо было так. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2009, 17:27 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
andrey_anonymous, я тоже не понял тайный смысл запрошенной информации, но мало ли :) оба вида ключей - dsa и rsa или что? если не сложно, приведите, пожалуйста, настройки sshd_config обоих серверов? мне кажетсЯ, что дело в них... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2009, 17:35 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
fabler, да, rsa+dsa. Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2009, 17:40 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
Собственно, разница в конфиге только одна - у меня нет строчки Код: plaintext ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2009, 18:08 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
andrey_anonymous , а где же вы храните ключики тогда? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2009, 19:42 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
Learning_Oracleandrey_anonymous , а где же вы храните ключики тогда? Код: plaintext ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2009, 20:19 |
|
||
|
беспарольный ssh между серверами Solaris 10
|
|||
|---|---|---|---|
|
#18+
а в конфиге? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.11.2009, 02:24 |
|
||
|
|

start [/forum/topic.php?fid=25&fpage=112&tid=1485333]: |
0ms |
get settings: |
5ms |
get forum list: |
8ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
49ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
57ms |
get tp. blocked users: |
1ms |
| others: | 206ms |
| total: | 340ms |

| 0 / 0 |
