From owner-freebsd-questions Sun Oct 14 19:54: 1 2001 Delivered-To: freebsd-questions@freebsd.org Received: from koza.acecape.com (koza2.acecape.com [66.9.36.222]) by hub.freebsd.org (Postfix) with ESMTP id C596E37B40D for ; Sun, 14 Oct 2001 19:53:58 -0700 (PDT) Received: from p65-147.acedsl.com (p65-147.acedsl.com [66.114.65.147]) by koza.acecape.com (8.10.1/8.9.3) with ESMTP id f9F2rv919786; Sun, 14 Oct 2001 22:53:57 -0400 (EDT) Date: Sun, 14 Oct 2001 22:58:27 -0400 (EDT) From: Francisco Reyes X-X-Sender: To: Cc: FreeBSD Questions List Subject: Re: Automating ssh connections so only one command would run. In-Reply-To: <20011012222025.I6274@blossom.cjclark.org> Message-ID: <20011014225334.V18306-100000@zoraida.natserv.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > >it is trivial to slip commands through scp(1), > > >$ scp 'remote:somefile;touch /tmp/scp_test' . > > > And check for /tmp/scp_test on the remote machine. > > I don't see how this is a security problem. Could you explain? > > I presume you want to limit people to scp(1) so they do not have full > shell access; they can't execute arbitrary commands on the remote > machine. With scp(1), you can do, > > $ cat > command.sh < > exec > command.out 2>&1 > > > > EOF > $ scp command.sh remote: > $ scp 'remote:nonexistent; /bin/sh command.sh' . > $ scp remote:command.out . > $ more command.out I just did what you wrote above. All a person would be able to do is to copy the command.sh file/command to the other machine. If I could limit their ability to only run scp and not ssh there would be no harm (in my setup) just by been able to copy arbitrary files. Of course I still need to have a quota so they don't override the space on the other machine, but that is not all too much trouble. > > Automating scp may not be the most secure way to copy data, but is there a > > better way? > scp = ssh = shell access. But I may have misunderstood what you are > trying to achieve. I am just trying to copy 2 files every day from one machine to another. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message