Re: ssh-add cannot connect to authentication agent
Haven't been able to nail it down that specific. I ended up modifying ssh-agent to run as a service under the SYSTEM account rather than as a background process under the user-account. It worked fine that way, even with McAfee but like I said, it required a modification of ssh-agent itself. Tim Len Giambrone wrote: I'm using XP. I disabled everything I could in McAfee, but still no luck. Did you figure out what in McAfee was causing the problem in W2K? -Len Tim Beuman [EMAIL PROTECTED] writes: I had the same problem on W2K. Seemed to be caused by McAfee. No problems with McAfee on WXP though. Tim Len Giambrone wrote: The agent starts correctly, but I can't get ssh-add to give me anything other than: Could not open a connection to your authentication agent. I'm running the latest Cygwin/packages. The socket is where it's supposed to be, the env variables are set. I've tried using ssh-agent -a and putting the socket in a different place in case it's a permissions issue, but no luck. I have it working on my laptop. A combination of comparing an strace of the failing and working ssh-add and a previous post of Corinna's leads me to believe the problem is here: 67 84289 [main] ssh-add 4264 cygwin_select: 4, 0x0, 0x22C870, 0x22C850, 0x0 117 84406 [main] ssh-add 4264 dtable::select_write: fd 3 49 84455 [main] ssh-add 4264 dtable::select_except: fd 3 47 84502 [main] ssh-add 4264 cygwin_select: to NULL, ms 51 84553 [main] ssh-add 4264 cygwin_select: sel.always_ready 0 115 84668 [main] ssh-add 4264 start_thread_socket: Handle 0x6D0 54 84722 [main] ssh-add 4264 start_thread_socket: Added to writefds 47 84769 [main] ssh-add 4264 start_thread_socket: Added to exceptfds 835 85604 [main] ssh-add 4264 start_thread_socket: opened new socket 0x6B8 70 85674 [main] ssh-add 4264 start_thread_socket: exitsock 0x6B8 54 85728 [main] ssh-add 4264 start_thread_socket: stuff_start 0x22C7D4 452 86180 [select_socket] ssh-add 4264 cygthread::stub: thread 'select_socke t', id 0x16B8, stack_ptr 0x1900CDC0 79 86259 [select_socket] ssh-add 4264 thread_socket: stuff_start 0x676F14 5405 91664 [main] ssh-add 4264 select_stuff::wait: m 2, ms 4294967295 993673 1085337 [select_socket] ssh-add 4264 thread_socket: Win32 select returned 1 85 1085422 [select_socket] ssh-add 4264 thread_socket: s 0x673ED0, testing fd 3 () 63 1085485 [select_socket] ssh-add 4264 thread_socket: except_ready *** In the working strace, this is write_ready *** 64 1085549 [main] ssh-add 4264 select_stuff::wait: woke up. wait_ret 1. ver ifying 51 1085600 [main] ssh-add 4264 select_stuff::wait: gotone 1 45 1085645 [main] ssh-add 4264 select_stuff::wait: returning 0 42 1085687 [main] ssh-add 4264 select_stuff::cleanup: calling cleanup routine s 44 1085731 [main] ssh-add 4264 socket_cleanup: si 0x673F00 si-thread 0x61104 F30 73 1085804 [main] ssh-add 4264 socket_cleanup: sent a byte to exitsock 0x6B8, res 1 86 1085890 [main] ssh-add 4264 socket_cleanup: reading a byte from exitsock 0 x6B8 58 1085948 [main] ssh-add 4264 socket_cleanup: recv returned 1 91 1086039 [main] ssh-add 4264 socket_cleanup: returning 50 1086089 [main] ssh-add 4264 peek_socket: considering handle 0x6D0 43 1086132 [main] ssh-add 4264 peek_socket: adding write fd_set , fd 3 54 1086186 [main] ssh-add 4264 peek_socket: WINSOCK_SELECT returned 0 43 1086229 [main] ssh-add 4264 set_bits: me 0x673ED0, testing fd 3 () 44 1086273 [main] ssh-add 4264 set_bits: ready 1 44 1086317 [main] ssh-add 4264 select_stuff::poll: returning 1 43 1086360 [main] ssh-add 4264 select_stuff::cleanup: calling cleanup routine s 43 1086403 [main] ssh-add 4264 select_stuff::~select_stuff: deleting select r ecords 96 1086499 [main] ssh-add 4264 cygwin_getsockopt: WinSock SO_ERROR = 10061 44 1086543 [main] ssh-add 4264 cygwin_getsockopt: 0 = getsockopt (3, 65535, 0 x1007, 0x22C8B4, 0x22C8B8) 46 1086589 [main] ssh-add 4264 __set_errno: int cygwin_connect(int, const soc kaddr*, socklen_t):806 val 111 According to Corinna, Winsock 1006 is connection refused. As she suggests in that post, I've disabled the firewall to see if that fixes the problem, but no luck. I've uninstalled and reinstalled ssh several times and of course rebooted several times. Still no luck. At this point, the only other thing I can think of to try is reinstalling Cygwin from scratch, but I'd like to avoid that if I can. Any suggestions on what else to try/look for? Cygcheck output follows. Cygwin Package Information Package VersionStatus _update-info-dir00517-1OK alternatives1.3.29a-1 OK apache 1.3.33-2 OK ash 20040127-3 OK base-files 3.7-1 OK base-passwd 2.2-1 OK bash
Re: ssh-add cannot connect to authentication agent
From: Tim Beuman Subject: Re: ssh-add cannot connect to authentication agent Date: Fri, 18 May 2007 09:11:00 -0700 Haven't been able to nail it down that specific. I ended up modifying ssh-agent to run as a service under the SYSTEM account rather than as a background process under the user-account. It worked fine that way, even with McAfee but like I said, it required a modification of ssh-agent itself. Tim Hi All... I've been using ssh-agent as a service for years, with no modifications. I started doing it because keychain was slow to start up and lost the keys on logout, whereas ssh-agent as a service keeps the keys until a reboot. Attached are two scripts secret-agent-service and secret-agent-service-install are the scripts used for running ssh-agent as a service (one for each user that wants it). The sendchenv makes sure that the environment variables are up to date (if the service starts after the user logs in...have to love Microsoft). HTH, ...Karl _ Like the way Microsoft Office Outlook works? Youll love Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-usocid=TXT_TAGHM_migration_HM_mini_outlook_0507 #!/bin/bash # Launch the ssh-agent from a service so it survives logoff. # When the service stops, kill the ssh-agent. trap ssh-agent -k; exit 0 TERM # Clean up old files that may be left behind after a crash. # The file permissions make this safe to do in a multi-user # environment, but /tmp must be local to this host. rm -rf /tmp/ssh-* # Launch the ssh-agent. eval $(ssh-agent) # Provide the ssh-agent socket ID via the registry and broadcast # the change in case the user is logged before we finish. # Do not provide the ssh-agent PID to minimize the risk of # accidentally killing the ssh-agent. regtool -s set /HKEY_CURRENT_USER/Environment/SSH_AUTH_SOCK $SSH_AUTH_SOCK regtool remove /HKEY_CURRENT_USER/Environment/SSH_AGENT_PID sendchenv # Wait quietly until the service is stopped. while true; do sleep 24h wait done #!/bin/bash # secret-agent-service-install service-name user-name if [ ~$1 = ~ ]; then echo A service name is required. exit 1 fi if [ ~$2 = ~ ]; then echo A user name is required. exit 1 fi echo Uninstalling the secret-agent service, $1. cygrunsrv --remove $1 echo Adding the \Log on as a Service\ right for $2. editrights -a SeServiceLogonRight -u $2 echo Installing the secret-agent service, $1. cygrunsrv --install $1 \ --args '/bin/secret-agent-service' \ --disp Secret Agent $2 \ --desc Creates an ssh-agent process for $2. \ --path '/bin/bash' \ --shutdown \ --user $2 echo Starting the secret-agent service, $1. cygrunsrv --start $1 // Notify all windows that environment variables may have changed. #include windows.h int main() { DWORD dwReturnValue; if (SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) Environment, SMTO_ABORTIFHUNG, 5000, dwReturnValue)) return 0; else return 1; } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ssh-add cannot connect to authentication agent
I had the same problem on W2K. Seemed to be caused by McAfee. No problems with McAfee on WXP though. Tim Len Giambrone wrote: The agent starts correctly, but I can't get ssh-add to give me anything other than: Could not open a connection to your authentication agent. I'm running the latest Cygwin/packages. The socket is where it's supposed to be, the env variables are set. I've tried using ssh-agent -a and putting the socket in a different place in case it's a permissions issue, but no luck. I have it working on my laptop. A combination of comparing an strace of the failing and working ssh-add and a previous post of Corinna's leads me to believe the problem is here: 67 84289 [main] ssh-add 4264 cygwin_select: 4, 0x0, 0x22C870, 0x22C850, 0x0 117 84406 [main] ssh-add 4264 dtable::select_write: fd 3 49 84455 [main] ssh-add 4264 dtable::select_except: fd 3 47 84502 [main] ssh-add 4264 cygwin_select: to NULL, ms 51 84553 [main] ssh-add 4264 cygwin_select: sel.always_ready 0 115 84668 [main] ssh-add 4264 start_thread_socket: Handle 0x6D0 54 84722 [main] ssh-add 4264 start_thread_socket: Added to writefds 47 84769 [main] ssh-add 4264 start_thread_socket: Added to exceptfds 835 85604 [main] ssh-add 4264 start_thread_socket: opened new socket 0x6B8 70 85674 [main] ssh-add 4264 start_thread_socket: exitsock 0x6B8 54 85728 [main] ssh-add 4264 start_thread_socket: stuff_start 0x22C7D4 452 86180 [select_socket] ssh-add 4264 cygthread::stub: thread 'select_socke t', id 0x16B8, stack_ptr 0x1900CDC0 79 86259 [select_socket] ssh-add 4264 thread_socket: stuff_start 0x676F14 5405 91664 [main] ssh-add 4264 select_stuff::wait: m 2, ms 4294967295 993673 1085337 [select_socket] ssh-add 4264 thread_socket: Win32 select returned 1 85 1085422 [select_socket] ssh-add 4264 thread_socket: s 0x673ED0, testing fd 3 () 63 1085485 [select_socket] ssh-add 4264 thread_socket: except_ready *** In the working strace, this is write_ready *** 64 1085549 [main] ssh-add 4264 select_stuff::wait: woke up. wait_ret 1. ver ifying 51 1085600 [main] ssh-add 4264 select_stuff::wait: gotone 1 45 1085645 [main] ssh-add 4264 select_stuff::wait: returning 0 42 1085687 [main] ssh-add 4264 select_stuff::cleanup: calling cleanup routine s 44 1085731 [main] ssh-add 4264 socket_cleanup: si 0x673F00 si-thread 0x61104 F30 73 1085804 [main] ssh-add 4264 socket_cleanup: sent a byte to exitsock 0x6B8, res 1 86 1085890 [main] ssh-add 4264 socket_cleanup: reading a byte from exitsock 0 x6B8 58 1085948 [main] ssh-add 4264 socket_cleanup: recv returned 1 91 1086039 [main] ssh-add 4264 socket_cleanup: returning 50 1086089 [main] ssh-add 4264 peek_socket: considering handle 0x6D0 43 1086132 [main] ssh-add 4264 peek_socket: adding write fd_set , fd 3 54 1086186 [main] ssh-add 4264 peek_socket: WINSOCK_SELECT returned 0 43 1086229 [main] ssh-add 4264 set_bits: me 0x673ED0, testing fd 3 () 44 1086273 [main] ssh-add 4264 set_bits: ready 1 44 1086317 [main] ssh-add 4264 select_stuff::poll: returning 1 43 1086360 [main] ssh-add 4264 select_stuff::cleanup: calling cleanup routine s 43 1086403 [main] ssh-add 4264 select_stuff::~select_stuff: deleting select r ecords 96 1086499 [main] ssh-add 4264 cygwin_getsockopt: WinSock SO_ERROR = 10061 44 1086543 [main] ssh-add 4264 cygwin_getsockopt: 0 = getsockopt (3, 65535, 0 x1007, 0x22C8B4, 0x22C8B8) 46 1086589 [main] ssh-add 4264 __set_errno: int cygwin_connect(int, const soc kaddr*, socklen_t):806 val 111 According to Corinna, Winsock 1006 is connection refused. As she suggests in that post, I've disabled the firewall to see if that fixes the problem, but no luck. I've uninstalled and reinstalled ssh several times and of course rebooted several times. Still no luck. At this point, the only other thing I can think of to try is reinstalling Cygwin from scratch, but I'd like to avoid that if I can. Any suggestions on what else to try/look for? Cygcheck output follows. Cygwin Package Information Package VersionStatus _update-info-dir00517-1OK alternatives1.3.29a-1 OK apache 1.3.33-2 OK ash 20040127-3 OK base-files 3.7-1 OK base-passwd 2.2-1 OK bash3.2.17-15 OK bc 1.06-2 OK binutils20060817-1 OK bzip2 1.0.3-2OK cabextract 1.1-1 OK coreutils 6.9-2 OK cron4.1-3 OK crypt 1.1-1 OK ctags 5.6-1 OK cygrunsrv 1.17-1 OK cygutils1.3.1-1OK cygwin
Re: ssh-add cannot connect to authentication agent
I'm using XP. I disabled everything I could in McAfee, but still no luck. Did you figure out what in McAfee was causing the problem in W2K? -Len Tim Beuman [EMAIL PROTECTED] writes: I had the same problem on W2K. Seemed to be caused by McAfee. No problems with McAfee on WXP though. Tim Len Giambrone wrote: The agent starts correctly, but I can't get ssh-add to give me anything other than: Could not open a connection to your authentication agent. I'm running the latest Cygwin/packages. The socket is where it's supposed to be, the env variables are set. I've tried using ssh-agent -a and putting the socket in a different place in case it's a permissions issue, but no luck. I have it working on my laptop. A combination of comparing an strace of the failing and working ssh-add and a previous post of Corinna's leads me to believe the problem is here: 67 84289 [main] ssh-add 4264 cygwin_select: 4, 0x0, 0x22C870, 0x22C850, 0x0 117 84406 [main] ssh-add 4264 dtable::select_write: fd 3 49 84455 [main] ssh-add 4264 dtable::select_except: fd 3 47 84502 [main] ssh-add 4264 cygwin_select: to NULL, ms 51 84553 [main] ssh-add 4264 cygwin_select: sel.always_ready 0 115 84668 [main] ssh-add 4264 start_thread_socket: Handle 0x6D0 54 84722 [main] ssh-add 4264 start_thread_socket: Added to writefds 47 84769 [main] ssh-add 4264 start_thread_socket: Added to exceptfds 835 85604 [main] ssh-add 4264 start_thread_socket: opened new socket 0x6B8 70 85674 [main] ssh-add 4264 start_thread_socket: exitsock 0x6B8 54 85728 [main] ssh-add 4264 start_thread_socket: stuff_start 0x22C7D4 452 86180 [select_socket] ssh-add 4264 cygthread::stub: thread 'select_socke t', id 0x16B8, stack_ptr 0x1900CDC0 79 86259 [select_socket] ssh-add 4264 thread_socket: stuff_start 0x676F14 5405 91664 [main] ssh-add 4264 select_stuff::wait: m 2, ms 4294967295 993673 1085337 [select_socket] ssh-add 4264 thread_socket: Win32 select returned 1 85 1085422 [select_socket] ssh-add 4264 thread_socket: s 0x673ED0, testing fd 3 () 63 1085485 [select_socket] ssh-add 4264 thread_socket: except_ready *** In the working strace, this is write_ready *** 64 1085549 [main] ssh-add 4264 select_stuff::wait: woke up. wait_ret 1. ver ifying 51 1085600 [main] ssh-add 4264 select_stuff::wait: gotone 1 45 1085645 [main] ssh-add 4264 select_stuff::wait: returning 0 42 1085687 [main] ssh-add 4264 select_stuff::cleanup: calling cleanup routine s 44 1085731 [main] ssh-add 4264 socket_cleanup: si 0x673F00 si-thread 0x61104 F30 73 1085804 [main] ssh-add 4264 socket_cleanup: sent a byte to exitsock 0x6B8, res 1 86 1085890 [main] ssh-add 4264 socket_cleanup: reading a byte from exitsock 0 x6B8 58 1085948 [main] ssh-add 4264 socket_cleanup: recv returned 1 91 1086039 [main] ssh-add 4264 socket_cleanup: returning 50 1086089 [main] ssh-add 4264 peek_socket: considering handle 0x6D0 43 1086132 [main] ssh-add 4264 peek_socket: adding write fd_set , fd 3 54 1086186 [main] ssh-add 4264 peek_socket: WINSOCK_SELECT returned 0 43 1086229 [main] ssh-add 4264 set_bits: me 0x673ED0, testing fd 3 () 44 1086273 [main] ssh-add 4264 set_bits: ready 1 44 1086317 [main] ssh-add 4264 select_stuff::poll: returning 1 43 1086360 [main] ssh-add 4264 select_stuff::cleanup: calling cleanup routine s 43 1086403 [main] ssh-add 4264 select_stuff::~select_stuff: deleting select r ecords 96 1086499 [main] ssh-add 4264 cygwin_getsockopt: WinSock SO_ERROR = 10061 44 1086543 [main] ssh-add 4264 cygwin_getsockopt: 0 = getsockopt (3, 65535, 0 x1007, 0x22C8B4, 0x22C8B8) 46 1086589 [main] ssh-add 4264 __set_errno: int cygwin_connect(int, const soc kaddr*, socklen_t):806 val 111 According to Corinna, Winsock 1006 is connection refused. As she suggests in that post, I've disabled the firewall to see if that fixes the problem, but no luck. I've uninstalled and reinstalled ssh several times and of course rebooted several times. Still no luck. At this point, the only other thing I can think of to try is reinstalling Cygwin from scratch, but I'd like to avoid that if I can. Any suggestions on what else to try/look for? Cygcheck output follows. Cygwin Package Information Package VersionStatus _update-info-dir00517-1OK alternatives1.3.29a-1 OK apache 1.3.33-2 OK ash 20040127-3 OK base-files 3.7-1 OK base-passwd 2.2-1 OK bash3.2.17-15 OK bc 1.06-2 OK
Re: ssh-add cannot connect to authentication agent
Len Giambrone wrote: I'm using XP. I disabled everything I could in McAfee, but still no luck. Did you figure out what in McAfee was causing the problem in W2K? It's been noted in the past that disabling is often not enough with these kinds of intrusive (and buggy) programs. I'd recommend trying to uninstall it. If you cannot do that for some reason and cannot switch to another vendor which doesn't have this problem, make sure you're running the latest version of McAfee. Who knows. Maybe they've fixed something. ;-) -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
ssh-add cannot connect to authentication agent
The agent starts correctly, but I can't get ssh-add to give me anything other than: Could not open a connection to your authentication agent. I'm running the latest Cygwin/packages. The socket is where it's supposed to be, the env variables are set. I've tried using ssh-agent -a and putting the socket in a different place in case it's a permissions issue, but no luck. I have it working on my laptop. A combination of comparing an strace of the failing and working ssh-add and a previous post of Corinna's leads me to believe the problem is here: 67 84289 [main] ssh-add 4264 cygwin_select: 4, 0x0, 0x22C870, 0x22C850, 0x0 117 84406 [main] ssh-add 4264 dtable::select_write: fd 3 49 84455 [main] ssh-add 4264 dtable::select_except: fd 3 47 84502 [main] ssh-add 4264 cygwin_select: to NULL, ms 51 84553 [main] ssh-add 4264 cygwin_select: sel.always_ready 0 115 84668 [main] ssh-add 4264 start_thread_socket: Handle 0x6D0 54 84722 [main] ssh-add 4264 start_thread_socket: Added to writefds 47 84769 [main] ssh-add 4264 start_thread_socket: Added to exceptfds 835 85604 [main] ssh-add 4264 start_thread_socket: opened new socket 0x6B8 70 85674 [main] ssh-add 4264 start_thread_socket: exitsock 0x6B8 54 85728 [main] ssh-add 4264 start_thread_socket: stuff_start 0x22C7D4 452 86180 [select_socket] ssh-add 4264 cygthread::stub: thread 'select_socke t', id 0x16B8, stack_ptr 0x1900CDC0 79 86259 [select_socket] ssh-add 4264 thread_socket: stuff_start 0x676F14 5405 91664 [main] ssh-add 4264 select_stuff::wait: m 2, ms 4294967295 993673 1085337 [select_socket] ssh-add 4264 thread_socket: Win32 select returned 1 85 1085422 [select_socket] ssh-add 4264 thread_socket: s 0x673ED0, testing fd 3 () 63 1085485 [select_socket] ssh-add 4264 thread_socket: except_ready *** In the working strace, this is write_ready *** 64 1085549 [main] ssh-add 4264 select_stuff::wait: woke up. wait_ret 1. ver ifying 51 1085600 [main] ssh-add 4264 select_stuff::wait: gotone 1 45 1085645 [main] ssh-add 4264 select_stuff::wait: returning 0 42 1085687 [main] ssh-add 4264 select_stuff::cleanup: calling cleanup routine s 44 1085731 [main] ssh-add 4264 socket_cleanup: si 0x673F00 si-thread 0x61104 F30 73 1085804 [main] ssh-add 4264 socket_cleanup: sent a byte to exitsock 0x6B8, res 1 86 1085890 [main] ssh-add 4264 socket_cleanup: reading a byte from exitsock 0 x6B8 58 1085948 [main] ssh-add 4264 socket_cleanup: recv returned 1 91 1086039 [main] ssh-add 4264 socket_cleanup: returning 50 1086089 [main] ssh-add 4264 peek_socket: considering handle 0x6D0 43 1086132 [main] ssh-add 4264 peek_socket: adding write fd_set , fd 3 54 1086186 [main] ssh-add 4264 peek_socket: WINSOCK_SELECT returned 0 43 1086229 [main] ssh-add 4264 set_bits: me 0x673ED0, testing fd 3 () 44 1086273 [main] ssh-add 4264 set_bits: ready 1 44 1086317 [main] ssh-add 4264 select_stuff::poll: returning 1 43 1086360 [main] ssh-add 4264 select_stuff::cleanup: calling cleanup routine s 43 1086403 [main] ssh-add 4264 select_stuff::~select_stuff: deleting select r ecords 96 1086499 [main] ssh-add 4264 cygwin_getsockopt: WinSock SO_ERROR = 10061 44 1086543 [main] ssh-add 4264 cygwin_getsockopt: 0 = getsockopt (3, 65535, 0 x1007, 0x22C8B4, 0x22C8B8) 46 1086589 [main] ssh-add 4264 __set_errno: int cygwin_connect(int, const soc kaddr*, socklen_t):806 val 111 According to Corinna, Winsock 1006 is connection refused. As she suggests in that post, I've disabled the firewall to see if that fixes the problem, but no luck. I've uninstalled and reinstalled ssh several times and of course rebooted several times. Still no luck. At this point, the only other thing I can think of to try is reinstalling Cygwin from scratch, but I'd like to avoid that if I can. Any suggestions on what else to try/look for? Cygcheck output follows. Cygwin Package Information Package VersionStatus _update-info-dir00517-1OK alternatives1.3.29a-1 OK apache 1.3.33-2 OK ash 20040127-3 OK base-files 3.7-1 OK base-passwd 2.2-1 OK bash3.2.17-15 OK bc 1.06-2 OK binutils20060817-1 OK bzip2 1.0.3-2OK cabextract 1.1-1 OK coreutils 6.9-2 OK cron4.1-3 OK crypt 1.1-1 OK ctags 5.6-1 OK cygrunsrv 1.17-1 OK cygutils1.3.1-1OK cygwin 1.5.24-2 OK cygwin-doc 1.4-4 OK cygwin-x-doc1.0.4-1OK diffutils