Piotr82 Napisano Grudzień 9, 2005 Zgłoszenie Share Napisano Grudzień 9, 2005 Witam , chciałbym prosić o zweryfikowanie mojej konfiguracji SSH. Bardzo mi zależy żeby owa konfiguracja była jak najlepsza. Teraz tak , to jest z FC4, jak rozumiem bo już nie pamiętam ssh serwer instaluje się domyslnie i jest właczony. Druga sprawa to jest serwer OpenSSH tak ? Ok i kolejna sprawa możecie napisać jakie zabezpieczenia właczyć jakie klucze i jak zrobić żeby dodać klucz prywatny i publiczny tak żeby dla konkretnego hosta następowało zalogowanie bez hasła. ( bo tak to rozumiem działa ) Aha i ostatnia rzecz na początek to jest SSH2 jak rozumiem. Ok dzięki i mam nadzieje że się ktoś na tym zna tutaj KLIENT: # $OpenBSD: ssh_config,v 1.20 2005/01/28 09:45:53 dtucker Exp $ # This is the ssh client system-wide configuration file. See # ssh_config(5) for more information. This file provides defaults for # users, and the values can be changed in per-user configuration files # or on the command line. # Configuration data is parsed as follows: # 1. command line options # 2. user-specific file # 3. system-wide file # Any configuration value is only changed the first time it is set. # Thus, host-specific definitions should be at the beginning of the # configuration file, and defaults at the end. # Site-wide defaults for some commonly used options. For a comprehensive # list of available options, their meanings and defaults, please see the # ssh_config(5) man page. # Host * # ForwardAgent no # ForwardX11 no # RhostsRSAAuthentication no RSAAuthentication yes PasswordAuthentication yes # HostbasedAuthentication no # BatchMode no # CheckHostIP yes # AddressFamily any # ConnectTimeout 0 # StrictHostKeyChecking ask # IdentityFile ~/.ssh/identity # IdentityFile ~/.ssh/id_rsa # IdentityFile ~/.ssh/id_dsa # Port 22 # Protocol 2,1 # Cipher 3des # Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc # EscapeChar ~ Host * GSSAPIAuthentication yes # If this option is set to yes then remote X11 clients will have full access # to the original X11 display. As virtually no X11 client supports the untrusted # mode correctly we set this to yes. ForwardX11Trusted yes SERWER : # $OpenBSD: sshd_config,v 1.72 2005/07/25 11:59:40 markus Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options change a # default value. #Port 22 #Protocol 2,1 Protocol 2 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress :: # HostKey for protocol version 1 HostKey /etc/ssh/ssh_host_key # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key # Lifetime and size of ephemeral version 1 server key #KeyRegenerationInterval 1h #ServerKeyBits 768 # Logging # obsoletes QuietMode and FascistLogging #SyslogFacility AUTH SyslogFacility AUTHPRIV #LogLevel INFO # Authentication: #LoginGraceTime 2m PermitRootLogin yes #StrictModes yes #MaxAuthTries 6 RSAAuthentication yes #PubkeyAuthentication yes #AuthorizedKeysFile .ssh/authorized_keys # 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 # Don't read the user's ~/.rhosts and ~/.shosts files #IgnoreRhosts yes # To disable tunneled clear text passwords, change to no here! #PasswordAuthentication yes PermitEmptyPasswords no PasswordAuthentication yes # Change to no to disable s/key passwords #ChallengeResponseAuthentication yes ChallengeResponseAuthentication no # Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes #KerberosGetAFSToken no # GSSAPI options #GSSAPIAuthentication no GSSAPIAuthentication yes #GSSAPICleanupCredentials yes GSSAPICleanupCredentials yes # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication mechanism. # Depending on your PAM configuration, this may bypass the setting of # PasswordAuthentication, PermitEmptyPasswords, and # "PermitRootLogin without-password". If you just want the PAM account and # session checks to run without PAM authentication, then enable this but set # ChallengeResponseAuthentication=no #UsePAM no UsePAM yes #AllowTcpForwarding yes #GatewayPorts no #X11Forwarding no X11Forwarding yes #X11DisplayOffset 10 #X11UseLocalhost yes PrintMotd yes #PrintLastLog yes #TCPKeepAlive yes #UseLogin no #UsePrivilegeSeparation yes #PermitUserEnvironment no #Compression delayed #ClientAliveInterval 0 #ClientAliveCountMax 3 #UseDNS yes #PidFile /var/run/sshd.pid #MaxStartups 10 #ShowPatchLevel no # no default banner path #Banner /some/path # override default of no subsystems Subsystem sftp /usr/libexec/openssh/sftp-server Odnośnik do komentarza Udostępnij na innych stronach More sharing options...
wachu0809 Napisano Grudzień 9, 2005 Zgłoszenie Share Napisano Grudzień 9, 2005 jak zrobić żeby dodać klucz prywatny i publiczny tak żeby dla konkretnego hosta następowało zalogowanie bez hasła to dziwne bardzo po co chcesz zeby ktos sie logowal bez hasla? przeciez nawet przy dostepie fizycznym do maszyny aby sie zalogowac wymagane jest haslo z tego co mi sie wydaje jezeli sie chcesz logowac bez hasla to musisz miec konto bez hasla na swojej maszynie, a to jest z lekka nierozsadne Odnośnik do komentarza Udostępnij na innych stronach More sharing options...
Piotr82 Napisano Grudzień 10, 2005 Autor Zgłoszenie Share Napisano Grudzień 10, 2005 Po to chce że musze opisać SSH dokładnie co i jak. Z tego co mi wiadomo logowanie bez hasła w SSH może działać dlatego że ssh rozpoznaje użytkowników. Np. dodaje sobie jeden jakiśtam komputer i jest on rozpoznawany ... właśnie o to dokładnie pytam?? Odnośnik do komentarza Udostępnij na innych stronach More sharing options...
Apache Napisano Grudzień 12, 2005 Zgłoszenie Share Napisano Grudzień 12, 2005 Kiedys to robilem ale słabo pamiętam. Po pierwsze odznaczyć to RSAAuthentication yes #PubkeyAuthentication yes #AuthorizedKeysFile .ssh/authorized_keys Utworzyc /home/.ssh/authorized_keys (parametry 600) Pózniej wygenerować klucz i przeslac na zdalna maszynę do powyzszego katalogu. Jeszce cos robiło sie z known_hosts, ale juz pamięć nie ta. Pozdrawiam Odnośnik do komentarza Udostępnij na innych stronach More sharing options...
smopi Napisano Grudzień 14, 2005 Zgłoszenie Share Napisano Grudzień 14, 2005 Witam! Jeśli chcesz umożliwić logowanie przy pomocy klucza prywatnego na konto user1 to w katalogu domowym (czyli /home/user1) tworzysz katalog .ssh a w nim plik authorized_keys. W tym pliku umieszczasz przynajmniej jeden klucz publiczny (ale może być ich więcej - dzięki temu kilka osób może logować się na to konto przy pomocy swoich kluczy prywatnych). Oczywiście konto user1 może mieć też ustawione hasło - sposób autentykacji (klucz czy hasło) ustawia się w programie klienckim (np. w PuTTY). Dzięki tej metodzie można w dowolny sposób zdecydować który z pracowników ma mieć dostęp do konta user1 (wgrywamy odpowiednie klucze publiczne tych pracowników do /home/user1/.ssh/authorized_keys a z drugiej strony można klucz publiczny zapisać w pliku authorized_keys dla kilku kont na serwerze (dzięki temu jeden pracownik może "wchodzić" na kilka kont na serwerze). U mnie tak to działa na AIX przy użyciu Open SSH. Na Fedorce powinno być tak samo... Pozdrawiam, Piotr Odnośnik do komentarza Udostępnij na innych stronach More sharing options...
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się