On Feb 4, 2004, at 1:01 AM, A Ballesteros wrote:


On Feb 3, 2004, at 11:31 AM, Alexander Hansen wrote:

Problem:
I haven't been able to get sshd from openssh-3.7.1p1-1 to work "out of the box". On both of my machines if I am running with this sshd, whenever I try to ssh in, I get the following response:


$ ssh ldx4.psfc.mit.edu
Connection closed by 198.125.178.243

Did you modify the default sshd_config for your needs? Comparing it to Apple's default /private/etc/sshd_config may shed some light on how the auth could be configured. What do the logs say? If you don't have it logging can you run sshd in debug mode with the -d flag to see what it says as you attempt to connect?





I didn't modify the default sshd_config, but the differences between it and the Fink-installed sshd_config didn't seem that obvious. Here's a diff:


===

% diff -Naur /etc/sshd_config /sw/etc/ssh/sshd_config
--- /etc/sshd_config    Thu Sep 25 19:11:19 2003
+++ /sw/etc/ssh/sshd_config     Mon Jan 19 17:56:59 2004
@@ -1,9 +1,9 @@
-#      $OpenBSD: sshd_config,v 1.59 2002/09/25 11:17:16 markus Exp $
+#      $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 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/bin:/bin:/usr/sbin:/sbin
+# This sshd was compiled with PATH=/sw/bin:/usr/bin:/bin:/sw/sbin:/usr/sbin:/sbin:/usr/X11R6/bin


 # The strategy used for options in the default sshd_config shipped with
 # OpenSSH is to specify options with their default value where
@@ -16,13 +16,13 @@
 #ListenAddress ::

 # HostKey for protocol version 1
-#HostKey /etc/ssh_host_key
+#HostKey /sw/etc/ssh/ssh_host_key
 # HostKeys for protocol version 2
-#HostKey /etc/ssh_host_rsa_key
-#HostKey /etc/ssh_host_dsa_key
+#HostKey /sw/etc/ssh/ssh_host_rsa_key
+#HostKey /sw/etc/ssh/ssh_host_dsa_key

 # Lifetime and size of ephemeral version 1 server key
-#KeyRegenerationInterval 3600
+#KeyRegenerationInterval 1h
 #ServerKeyBits 768

 # Logging
@@ -32,7 +32,7 @@

# Authentication:

-#LoginGraceTime 120
+#LoginGraceTime 2m
 #PermitRootLogin yes
 #StrictModes yes

@@ -40,17 +40,15 @@
 #PubkeyAuthentication yes
 #AuthorizedKeysFile    .ssh/authorized_keys

-# rhosts authentication should not be used
-#RhostsAuthentication no
-# Don't read the user's ~/.rhosts and ~/.shosts files
-#IgnoreRhosts yes
-# For this to work you will also need host keys in /etc/ssh_known_hosts
+# For this to work you will also need host keys in /sw/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
@@ -64,15 +62,17 @@
 #KerberosOrLocalPasswd yes
 #KerberosTicketCleanup yes

-#AFSTokenPassing no
-
-# Kerberos TGT Passing only works with the AFS kaserver
-#KerberosTgtPassing no
-
-# Set this to 'yes' to enable PAM keyboard-interactive authentication
-# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
-#PAMAuthenticationViaKbdInt no
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCreds yes
+
+# Set this to 'yes' to enable PAM authentication (via challenge-response)
+# and session processing. Depending on your PAM configuration, this may
+# bypass the setting of 'PasswordAuthentication'
+#UsePAM yes


+#AllowTcpForwarding yes
+#GatewayPorts no
 #X11Forwarding no
 #X11DisplayOffset 10
 #X11UseLocalhost yes
@@ -83,11 +83,14 @@
 #UsePrivilegeSeparation yes
 #PermitUserEnvironment no
 #Compression yes
-
+#ClientAliveInterval 0
+#ClientAliveCountMax 3
+#UseDNS yes
+#PidFile /sw/var/run/sshd.pid
 #MaxStartups 10
+
 # no default banner path
 #Banner /some/path
-VerifyReverseMapping yes

 # override default of no subsystems
-Subsystem      sftp    /usr/libexec/sftp-server
+Subsystem      sftp    /sw/lib/sftp-server
===

Here's what I get when running debug mode and then connecting:

===

% sudo sshd -d
debug1: sshd version OpenSSH_3.7.1p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
Generating 768 bit RSA key.
RSA key generation complete.
debug1: Server will not fork when running in debugging mode.
Connection from 198.125.177.213 port 53519
debug1: Client protocol version 2.0; client software version OpenSSH_3.7.1p1
debug1: match: OpenSSH_3.7.1p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-1.99-OpenSSH_3.7.1p1
debug1: permanently_set_uid: 75/75
setreuid 75: Operation not permitted
debug1: Calling cleanup 0x276e8(0x0)



-- Alexander K. Hansen Levitated Dipole Experiment http://www.psfc.mit.edu/LDX



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to