Mail Archives: cygwin/1999/05/10/07:05:11
So here goes my problem: When running sshd1 -d everything works fine
except that the sshd1 won't serve more than one connection request
(that's by design). sshd1 -d as run from either bash or cmd.exe, has a
positive integer TTY as reported by ps.
When I install (with instsrv and srvany from NT resource kit) sshd1
as a service, run it with an account which has all NT user rights except
"Add workstations to domain" and try to ssh1 localhost (195.197.27.169,
but sshd_config restricts listening to that IP, localhost is not an
allowed source for login), the following happens:
bash$ ps
PID TTY STIME COMMAND
1024 0 11:24:29 /H-i586-cygwin32/bin/bash.exe
1316 -1 13:32:54 /usr/local/sbin/sshd1.exe
1317 1 13:32:57 /bin/ps.exe
1087 1 11:37:20 /H-i586-cygwin32/bin/bash.exe
bash$ ssh1 195.197.27.169 bash --login -i
juhaj AT 195 DOT 197 DOT 27 DOT 169's password:
bash: no job control in this shell
ls: write error: Bad file number
bash-2.02$ logout
bash$
(Before you begin wondering what the error from "ls" means, read the
rest of the message. Also, if I run ssh1 IP bash --login without -i, the
word displayed is not "logout" but "exit" - as is natural.)
Now my problem is that I DID NOT type that "logout" not has it come
from any .bashrc or /etc/profile (they are catenated later). There
obviously is some reason for bash forcing a logout but I cannot figure
out any other than an EOF from stdin.
Speculation: I suspect this EOF comes from a non-existent or
"zero-length" TTY. Now I can clearly see that sshd1.exe has a very
strange tty: -1. Can this be fixed somehow to be a natural number and is
it likely that this strange TTY number is the source of my problems?
Any ideas are appreciated and please cc them to me as I no longer
subscribe to the list. Thanks.
Some background (output from export is little cleaned up from my
hitachi microcontroller C-compiler env variables and such):
bash$ export
declare -x COMPUTERNAME="STIFF"
declare -x COMSPEC="C:\\WINNT\\system32\\cmd.exe"
declare -x CYGWIN="tty"
declare -x HOME="/home/JUHAJ"
declare -x HOMEDRIVE="C:"
declare -x HOMEPATH="C:\\home\\JUHAJ"
declare -x HOSTNAME="stiff"
declare -x MACHTYPE="i586-pc-cygwin32"
declare -x OSTYPE="cygwin32"
declare -x PATH="/bin:/usr/local/bin:/usr/local/sbin:/usr/X11R6.4/bin"
declare -x PS1="bash\$ "
declare -x PWD="/"
declare -x SHELL="/bin/sh"
declare -x SHLVL="1"
declare -x SYSTEMDRIVE="C:"
declare -x SYSTEMROOT="C:\\WINNT"
declare -x TEMP="C:\\TEMP"
declare -x TERM="cygwin"
declare -x TMP="C:\\TEMP"
declare -x USERNAME="JUHAJ"
declare -x USERPROFILE="C:\\WINNT\\Profiles\\juhaj"
declare -x WINDIR="C:\\WINNT"
bash$ cat /etc/profile
ls -la
export PATH=/bin:/usr/local/bin:/usr/local/sbin:/usr/X11R6.4/bin
cd /home/juhaj
/home/juhaj/.bashrc
bash-2.02$ logout
bash$ mount
Device Directory Type Flags
c:\temp /tmp native text=binary
c:\home /home native text=binary
con /dev/tty native text=binary
c:\cygnus\cygwin-b20 / native text=binary
bash$ cat /home/juhaj/.bashrc
echo $HOME
bash$
--
Juha Jäykkä, juhaj AT iki DOT fi
PS See http://www.dcs.ex.ac.uk/~aba/rsa/ for latest version of RSA in
perl.
Here goes the RSA code in two lines:
print pack"C*",split/\D+/,`echo
"16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<>
)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -