January 2nd, 2005

  • evan

sftp subsystem and tla

Arch uses sftp to mirror repositories. My host has the sftp subsystem turned off. So you get failures like this:
% tla make-archive --mirror martine@danga.com--2004-kitten sftp://danga.com/home/martine/projects/arch/martine@danga.com--2004-kitten
martine@danga.com's password:
Request for subsystem 'sftp' failed on channel 0
Error reading from server

My hacky fix is to edit src/tla/libarch/pfs-sftp.c and change the sftp command line from requesting the sftp subsystem (which for OpenSSH makes the command line include a -s and an sftp after the hostname) to requesting the sftp server directly: remove the -s and make the final argument /usr/lib/sftp-server.

It's a little annoying 'cause I have to rebuild tla every time I use it on a new computer, but it's not so bad as far compared to the slow-motion trainwreck that is most times I try to do something useful with these things.