Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam,
próbowałem sam dojsc co jest nie tak ale nie mam pojęcia.
system to lenny, VPS. Problem polega na tym iż jak prubuję się zalogować do serwera z jakiejkolwiek maszyny ( nawet z localhosta ) shrek@localhost to konczy się komunikatem bledow jak nizej. Jedynie moge sie do konsoli zalogowac z xenconsole z konta root'a. Inne konta nie loguja sie :( ale no do webmina leguje mnie normalnie kontami systemowymi.
Nic w systemie nie zmieniałem jak to sie stało...
v2:~# ssh shrek@localhost -v OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to localhost [127.0.0.1] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/id_rsa type 1 debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048 debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048 debug1: identity file /root/.ssh/id_dsa type -1 ssh_exchange_identification: Connection closed by remote host
ssh v2 -v OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to v2 [IP] port 22. debug1: Connection established. debug1: identity file /home/shrek/.ssh/identity type -1 debug1: identity file /home/shrek/.ssh/id_rsa type -1 debug1: identity file /home/shrek/.ssh/id_dsa type -1 ssh_exchange_identification: Connection closed by remote host
auth.log
autoryzacja kluczem
9368 Oct 20 21:39:54 v2 sshd[17569]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8 9369 Oct 20 21:39:54 v2 sshd[17513]: debug1: Forked child 17569. 9370 Oct 20 21:39:54 v2 sshd[17569]: debug1: inetd sockets after dupping: 3, 3 9371 Oct 20 21:39:54 v2 sshd[17569]: Connection from IP port 16248 9372 Oct 20 21:39:54 v2 sshd[17569]: debug1: Client protocol version 2.0; client software version PuTTY_Release_0.60 9373 Oct 20 21:39:54 v2 sshd[17569]: debug1: no match: PuTTY_Release_0.60 9374 Oct 20 21:39:54 v2 sshd[17569]: debug1: Enabling compatibility mode for protocol 2.0 9375 Oct 20 21:39:54 v2 sshd[17569]: debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5 9376 Oct 20 21:39:55 v2 sshd[17569]: debug1: PAM: initializing for "shrek" 9377 Oct 20 21:39:55 v2 sshd[17569]: debug1: PAM: setting PAM_RHOST to "chelloxxxxxx.chello.pl" 9378 Oct 20 21:39:55 v2 sshd[17569]: debug1: PAM: setting PAM_TTY to "ssh" 9379 Oct 20 21:39:55 v2 sshd[17569]: Failed none for shrek from xxxxxxxx port 16248 ssh2 9380 Oct 20 21:39:55 v2 sshd[17569]: debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2047 9381 Oct 20 21:39:55 v2 sshd[17569]: debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2047 9382 Oct 20 21:39:55 v2 sshd[17569]: debug1: temporarily_use_uid: 1000/1000 (e=0/0) 9383 Oct 20 21:39:55 v2 sshd[17569]: debug1: trying public key file /home/shrek/.ssh/authorized_keys 9384 Oct 20 21:39:55 v2 sshd[17569]: debug1: fd 4 clearing O_NONBLOCK 9385 Oct 20 21:39:55 v2 sshd[17569]: debug1: restore_uid: 0/0 9386 Oct 20 21:39:55 v2 sshd[17569]: debug1: temporarily_use_uid: 1000/1000 (e=0/0) 9387 Oct 20 21:39:55 v2 sshd[17569]: debug1: trying public key file /home/shrek/.ssh/authorized_keys2 9388 Oct 20 21:39:55 v2 sshd[17569]: debug1: fd 4 clearing O_NONBLOCK 9389 Oct 20 21:39:55 v2 sshd[17569]: debug1: matching key found: file /home/shrek/.ssh/authorized_keys2, line 1 9390 Oct 20 21:39:55 v2 sshd[17569]: Found matching RSA key: 3b:0b:74:d5:6e:af:ba:d3:f5:32:4d:bd:60:b3:84:4f 9391 Oct 20 21:39:55 v2 sshd[17569]: debug1: restore_uid: 0/0 9392 Oct 20 21:39:55 v2 sshd[17569]: debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2047 9393 Oct 20 21:39:55 v2 sshd[17569]: debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2047 9394 Oct 20 21:39:55 v2 sshd[17569]: debug1: temporarily_use_uid: 1000/1000 (e=0/0) 9395 Oct 20 21:39:55 v2 sshd[17569]: debug1: trying public key file /home/shrek/.ssh/authorized_keys 9396 Oct 20 21:39:55 v2 sshd[17569]: debug1: fd 4 clearing O_NONBLOCK 9397 Oct 20 21:39:55 v2 sshd[17569]: debug1: restore_uid: 0/0 9398 Oct 20 21:39:55 v2 sshd[17569]: debug1: temporarily_use_uid: 1000/1000 (e=0/0) 9399 Oct 20 21:39:55 v2 sshd[17569]: debug1: trying public key file /home/shrek/.ssh/authorized_keys2 9400 Oct 20 21:39:55 v2 sshd[17569]: debug1: fd 4 clearing O_NONBLOCK 9401 Oct 20 21:39:55 v2 sshd[17569]: debug1: matching key found: file /home/shrek/.ssh/authorized_keys2, line 1 9402 Oct 20 21:39:55 v2 sshd[17569]: Found matching RSA key: 3b:0b:74:d5:6e:af:ba:d3:f5:32:4d:bd:60:b3:84:4f 9403 Oct 20 21:39:55 v2 sshd[17569]: debug1: restore_uid: 0/0 9404 Oct 20 21:39:55 v2 sshd[17569]: debug1: ssh_rsa_verify: signature correct 9405 Oct 20 21:39:55 v2 sshd[17569]: debug1: do_pam_account: called 9406 Oct 20 21:39:55 v2 sshd[17569]: Accepted publickey for shrek from xxxxxx port 16248 ssh2 9407 Oct 20 21:39:55 v2 sshd[17569]: debug1: monitor_child_preauth: shrek has been authenticated by privileged process 9408 Oct 20 21:39:55 v2 sshd[17569]: debug1: PAM: establishing credentials 9409 Oct 20 21:39:55 v2 sshd[17569]: pam_unix(sshd:session): session opened for user shrek by (uid=0) 9410 Oct 20 21:39:55 v2 sshd[17571]: debug1: SELinux support disabled 9411 Oct 20 21:39:55 v2 sshd[17571]: debug1: PAM: establishing credentials 9412 Oct 20 21:39:55 v2 sshd[17571]: debug1: permanently_set_uid: 1000/1000 9413 Oct 20 21:39:55 v2 sshd[17571]: debug1: Entering interactive session for SSH2. 9414 Oct 20 21:39:55 v2 sshd[17571]: debug1: server_init_dispatch_20 9415 Oct 20 21:39:55 v2 sshd[17569]: User child is on pid 17571 9416 Oct 20 21:39:56 v2 sshd[17571]: debug1: server_input_channel_open: ctype session rchan 256 win 16384 max 16384 9417 Oct 20 21:39:56 v2 sshd[17571]: debug1: input_session_request 9418 Oct 20 21:39:56 v2 sshd[17571]: debug1: channel 0: new [server-session] 9419 Oct 20 21:39:56 v2 sshd[17571]: debug1: session_new: session 0 9420 Oct 20 21:39:56 v2 sshd[17571]: debug1: session_open: channel 0 9421 Oct 20 21:39:56 v2 sshd[17571]: debug1: session_open: session 0: link with channel 0 9422 Oct 20 21:39:56 v2 sshd[17571]: debug1: server_input_channel_open: confirm session 9423 Oct 20 21:39:56 v2 sshd[17571]: debug1: server_input_channel_req: channel 0 request auth-agent-req@openssh.com reply 1 9424 Oct 20 21:39:56 v2 sshd[17571]: debug1: session_by_channel: session 0 channel 0 9425 Oct 20 21:39:56 v2 sshd[17571]: debug1: session_input_channel_req: session 0 req auth-agent-req@openssh.com 9426 Oct 20 21:39:56 v2 sshd[17571]: debug1: temporarily_use_uid: 1000/1000 (e=1000/1000) 9427 Oct 20 21:39:56 v2 sshd[17571]: debug1: restore_uid: (unprivileged) 9428 Oct 20 21:39:56 v2 sshd[17571]: debug1: channel 1: new [auth socket] 9429 Oct 20 21:39:56 v2 sshd[17571]: debug1: server_input_channel_req: channel 0 request pty-req reply 1 9430 Oct 20 21:39:56 v2 sshd[17571]: debug1: session_by_channel: session 0 channel 0 9431 Oct 20 21:39:56 v2 sshd[17571]: debug1: session_input_channel_req: session 0 req pty-req 9432 Oct 20 21:39:56 v2 sshd[17571]: debug1: Allocating pty. 9433 Oct 20 21:39:56 v2 sshd[17569]: debug1: session_new: session 0 9434 Oct 20 21:39:56 v2 sshd[17569]: debug1: SELinux support disabled 9435 Oct 20 21:39:56 v2 sshd[17571]: debug1: do_cleanup 9436 Oct 20 21:39:56 v2 sshd[17571]: debug1: temporarily_use_uid: 1000/1000 (e=1000/1000) 9437 Oct 20 21:39:56 v2 sshd[17571]: debug1: restore_uid: (unprivileged)
logowanie w konsolo TTY1 ( xen console )
9496 Oct 20 22:17:44 v2 login[13681]: pam_unix(login:session): session closed for user root 9497 Oct 20 22:17:52 v2 login[22023]: pam_unix(login:session): session opened for user root by LOGIN(uid=0) 9498 Oct 20 22:17:52 v2 login[22025]: ROOT LOGIN on 'tty1'
proba logowania przed zagrzebaniem sie w pam'ie tak konczylo sie logowanie do systemu.
Oct 20 19:52:31 v2 login[1878]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost= user=shrek Oct 20 19:52:34 v2 login[1878]: FAILED LOGIN (1) on 'tty1' FOR `shrek', Authentication failure
Co z tym moge zrobic?:( ja sie juz załamałem. Nie mam czasu na reinstalke maszyny :(
do /var/run/sshd jest 0755 root:root
Ostatnio edytowany przez shreku (2010-10-20 22:33:05)
Offline
Włącz najwyższy poziom gadatliwości dla klienta ssh (ssh -vvv) może powie więcej.
Offline
o jakim grzebaniu sie w pam'ie piszesz?
Offline
jedyne co robilem to wlaczalem i wylaczalem auth kluczem w ssh. Ale to nie sam problem ssh ale tez czegos innego bo w konsoli tylko root moze sie zalogowac:/ inny nawet nowo zalozony user nie moze :/
przepisalem (jak juz nie dzialalo ) konfiguracje /etc/pam.d/sshd z innej dzialajacej maszyny z ta sama wersja lennego.
Jak dotra do laptopa to podniose poziom logow na wyszy bo teraz z telefonu tego nie zrobie:/
Z jakich plikow kozysta autoryzacja lokalna moze cos e nich mi nie gra...
Offline
shreku napisał(-a):
w konsoli tylko root moze sie zalogowac:/ inny nawet nowo zalozony user nie moze
nie masz przypadkiem /etc/nologin ? pokaz co wypisuje (pyta o haslo czy od razu odrzuca, etc) przy probie logowania na konsoli oraz co jest dopisywane do auth.log
pokaz wynik:
grep -vx -e '#.*' -e '[^0-9a-zA-Z]*' /etc/security/*.conf
Offline
shreku napisał(-a):
Witam,
próbowałem sam dojsc co jest nie tak ale nie mam pojęcia.
system to lenny, VPS. ......
A czy tam nie ma przypadkiem grsecurity, apparmora, lub innego zabezpieczenia na poziomie kernela?
Bo np w Ubuntu nie szło się zalogować przez błąd w konfigu apparmora.
A systemy na VPS czasami mają takie dodatki.
Ostatnio edytowany przez Jacekalex (2010-10-23 16:20:18)
Offline
Wkleisz miszczu ssh -vvv ?
Offline
Hej, sory cały dzien poza kompem.
Generalnie działa. Problem lezał w limits.conf ale nie wiem gdzie dokładnie - wszystko pohashowałem i jest git.
#* soft core 0 #* hard rss 10000 #* soft core 0 #* hard core 0 #* hard rss 1000 #* hard memlock 1000 #* hard nproc 100 #* - maxlogins 10 #* hard data 102400 #* hard fsize 20480 #@adm hard core 100000 #@adm hard rss 100000 #@adm soft nproc 2000 #@adm hard nproc 3000 #@adm hard fsize 204800 #@adm - maxlogins 10 #root hard core 100000 #root hard rss 100000 #root soft nproc 2000 #root hard nproc 3000 #root hard fsize 3048000 #root - maxlogins 10
taki poczatek limits'a. Obstawiam ze -maxlogins weszło w zycie jakims dziewnym trafem i sie zblokowało cos. Zahashowałem i smiga jak ta lala
gr security brak
apparmora brak
Dziwi mnie tylko ze nikt w limitach nie grzebał a działac przestało.
Offline