Problem in sshconnect.c?

Paul Tiemann pault at bigplanet.net
Thu Mar 2 05:40:43 EST 2000


Hey all,

I installed OpenSSH on a redhat 6.0 box using the 1.2.2 i386 rpms, and I
can't connect to it from
other machines.  I edited the sshd_config file and changed the
ListenAddress from 0.0.0.0 to
the machine's IP number.

The error I have been getting at first confused me, so I checked out the
code, and found the function in the sshconnect.c file.  The strange
thing is that sometimes the error message is different, (not less
confusing, unfortunately)

This is the error message I've been getting:
-> ssh_exchange_identification: read: Success

I have also got it to give me these error messages:
-> ssh_exchange_identification: read: Address already in use
-> ssh_exchange_identification: read: File not found (something to that
effect)

It looks like the sshd on the server I am connecting to is not sending
anything back to me when I try to connect, but I go to the server
through telnet, and the /var/log/messages file logs the attempt to log
in...  So I know I'm getting through to the server at least...

I put some debug printf statements in the loop right after the read()
function call, and found that it would not even read one byte from the
server I was connecting to...

I tried for a few hours to troubleshoot any kinds of networking problems
the box might have, but couldn't find anything...

If you want to try to ssh in to the box itself, it is www.cyboards.com.
It should give you the same error message as I am getting.

Any help you guys can give would be greatly appreciated.

Regards,
Paul Tiemann

//------------- Here's a code snip from the sshconnect.c file below

void
ssh_exchange_identification()
{
 char buf[256], remote_version[256]; /* must be same size! */
 int remote_major, remote_minor, i;
 int connection_in = packet_get_connection_in();
 int connection_out = packet_get_connection_out();

 /* Read other side\'s version identification. */
 for (i = 0; i < sizeof(buf) - 1; i++) {
  buf[i + 1] = 0;

  if (read(connection_in, &buf[i], 1) != 1)
   fatal("ssh_exchange_identification: read: %.100s", strerror(errno));

  if (buf[i] == '\r') {
   buf[i] = '\n';
   buf[i + 1] = 0;
   break;
  }
  if (buf[i] == '\n') {
   buf[i + 1] = 0;
   break;
  }
 }







More information about the openssh-unix-dev mailing list