#!/bin/sh

# Copyright 2004 River of Stars, LLC

# $Id: showoriginalcommand.sh,v 1.1 2004/01/22 00:51:54 rjohnson Exp $

# install this as the forced command in an ssh authorized key
# to show the command that would have been executed without
# the command restriction.  this is useful for discovering
# hidden options or just verifying the syntax on the server
# side of a backup/mirror operation

# usage:  put this in an authorized key as
#           command="showoriginalcommand.sh"
#         attempt your scp, etc. via that key's authorization

# note that this unclean text output on the shell will cause
# rsync to fail.  to see the rsync command, skip this script
# and instead use 'rsync -vvv'

echo "Original SSH command is '$SSH_ORIGINAL_COMMAND'";
exit 0;

