i get segmentation fault when i try to ssh to a server, the ssh works in sudo mode but not at user mode.
these are the strace bits where the ssh breaks
open("/usr/include/pwd2.h", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
getpeername(3, {sa_family=AF_INET, sin_port=htons(222), sin_addr=inet_addr("xxx.xxx.xxx.xx")}, [16]) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
can anyone give me ideas about the problem?
Man, you've got rootkit, reinstall!. Your ssh binary is trying to write down every password its using to that file, also keep in mind that every password that you see there was compromised.
Check packages:
Reinstall/upgrade openssh-server:
Use gdb/valgrind to debug.