Hi! It feels like there is an obvious answer to this that I'm not seeing, but I've been testing, reading manuals and googling for a while now and can't seem to get it to work. I have an SSH server that mounts a windows share on login, to act as a SFTP proxy for windows home directories. The mounting of the users' homedirs is done via a call from /etc/ssh/sshrc. This mount sometimes fails, with the consequence that users get dumped into an empty homedir that they think is their actual windows homedir. This is bad. What I would like to do is to abort the connection, preferrably with some kind of descriptive error, when my sshrc script returns a non-zero exit status. Is this possible? Cheers, Erik Thuning
Erik Thuning wrote:> What I would like to do is to abort the connection, preferrably with > some kind of descriptive error, when my sshrc script returns a non-zero > exit status. Is this possible?kill -9 $PPID in sshrc would perhaps work? //Peter
That does seem to have done the trick, thank you! /T On 2020-09-18 18:45, Peter Stuge wrote:> Erik Thuning wrote: > > What I would like to do is to abort the connection, preferrably with > > some kind of descriptive error, when my sshrc script returns a non-zero > > exit status. Is this possible? > > kill -9 $PPID > > in sshrc would perhaps work? > > > //Peter > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev at mindrot.org > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev