Port of dropbear ssh

I have (somewhat) successfully ported dropbear to qnx 6.3.0 for powerpc and everything appears to work. However I’m getting some errors that I can’t quite figure out. Does anybody have any ideas? The result is if I control-C in the client shell, the connection is terminated. I don’t know if there are any other side effects. I believe that they are all related to not properly setting the controlling terminal.

Below are the errors. Above the errors are snippets of code where the error is being generated.

	if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0) {
			"ioctl(TIOCSCTTY): %.100s (%d)", strerror(errno), errno);
#endif /* TIOCSCTTY */


	/* Verify that we now have a controlling tty. */
	fd = open(_PATH_TTY, O_WRONLY);
	if (fd < 0) {
			"open /dev/tty failed - could not set controlling tty: %.100s",
	} else {

*** messages from server after client authenticates

[1265696] Jan 17 22:27:26 ioctl(TIOCSCTTY): Operation not permitted
[1265696] Jan 17 22:27:26 open /dev/tty failed - could not set controlling tty: No such device or address

*** messages in client

/bin/ksh: j_init: tcgetpgrp() failed: Inappropriate I/O control operation
/bin/ksh: warning: won’t have full job control

	if (!logout(line)) {
		dropbear_log(LOG_WARNING, "syslogin_perform_logout: logout(%s) returned an error: %s", line, strerror(errno));
	} else {
		logwtmp(line, "", "");
#  endif

*** logout ***

[1265695] Jan 17 22:30:24 syslogin_perform_logout: logout(ttyp0) returned an error: No such file or directory

Hi copperleaf,

I’m searching for a ssh-server for our PPC-embedded board. Like I read, you’ve ported dropbear. My question: Have you solved the errors you described or found additional strange behaviour? If not - perhaps you could let me know how (small manual) to easily create dropbear for Neutrino 6.3.0?