[[ Note: Oh for the love of fsck(8 )... "You are only allowed to post URLs to other sites after you have made 15 posts or more." Thus, I had to replace all 'at' characters in the below with '(at)'. Duh! ]]

I'm trying to get UUCP to work via SSH. That is, with a slave uucico as a user's login shell and the master chatting with it through a pipe. This currently involves two machines, 'twister' and 'hail'; the config on twister is as follows:

#### /etc/uucp/call:
hail Utwister foo

#### /etc/uucp/{config,dial,dialcode} are empty

#### /etc/uucp/passwd:
Uhail foo

#### /etc/uucp/port:
port hail_ssh_in
type stdin
protocol t

port hail_ssh_out
type pipe
protocol t
command ssh -a -x -q -T -e none -i /home/uucp/.ssh/id_rsa uucp-slave(at)hail

##### /etc/uucp/sys:
system hail
time Any
port hail_ssh_out

##############

User uucp(at)twister has a SSH key pair in their ~/.ssh and hail in their ~/.ssh/known_hosts.
User uucp-slave(at)twister has a copy of ~uucp(at)hail/.ssh/id_rsa.pub as their ~/.ssh/authorized_keys and 'uucico -l' as their login shell (through a wrapper binary, both levels using full absolute paths).

On hail, the setup is analogous, i.e. with the host names and keys reversed.

Running the pipe command manually works flawlessly:

#### snip
uucp(at)twister ~ $ ssh -a -x -q -T -e none -i /home/uucp/.ssh/id_rsa uucp-slave(at)hail
login: Utwister
Password:foo
Shere=hail
#### snip

But running "/usr/sbin/uucico -D -f -r1 -x chat,handshake,uucp-proto,proto,port,incoming,outgoing" yields the following on twister:

#### /var/log/uucp/Log:
uucico hail - (2010-09-28 22:34:44.65 21219) Calling system hail (port hail_ssh_out)
uucico hail - (2010-09-28 22:34:44.65 21219) ERROR: Line disconnected

#### /var/log/uucp/Debug:
uucico hail - (2010-09-28 22:34:44.65 21219) DEBUG: fconn_open: Opening port hail_ssh_out (default speed)
uucico hail - (2010-09-28 22:34:44.65 21219) Calling system hail (port hail_ssh_out)
uucico hail - (2010-09-28 22:34:44.65 21219) DEBUG: fcsend: Writing "\r"
uucico hail - (2010-09-28 22:34:44.65 21219) DEBUG: icexpect: Looking for 5 "ogin:"
uucico hail - (2010-09-28 22:34:44.65 21219) DEBUG: icexpect: Got "uucico hail - (2010-09-28 22:34:44.65 21219) ERROR: Line disconnected
" (error)
uucico hail - (2010-09-28 22:34:44.65 21219) DEBUG: fconn_close: Closing connection
uucico hail - (2010-09-28 22:34:48.66 21219) DEBUG: Call failed: 3 (Login failed)

The log file on hail remains untouched. So apparently, the master uucico tries to read the 'login:' from the pipe, but for some reason gets the last line from the log file instead. Question: What gives? :P

I tried googling "icexpect: Got uucico", but only got one (proper) hit; that guy solved his problem by adding the -i part to the ssh command line (which didn't change anything for me).