Operating System - HP-UX
1753914 Members
8969 Online
108810 Solutions
New Discussion юеВ

Can sftp and scp work together

 
SOLVED
Go to solution
Chris Cruz_1
Occasional Advisor

Can sftp and scp work together

I've found a doc on the ITRC web site (doc id 4000096265) on how to set up an id for sftp only, which works great. But we have one client who says that they will want to use sftp and scp. So I've been playing with this script to make it work with scp as well but with not much luck. I was wondering if it is possible at all to do this? How can I make sft and scp work together?
8 REPLIES 8
Alex Lavrov.
Honored Contributor

Re: Can sftp and scp work together

What's the problem?

After SSH installation you have both sftp an scp working. Do you get any error message?


Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
HGN
Honored Contributor
Solution

Re: Can sftp and scp work together

Hi

When you install the HP SSH
T1471AA HP-UX Secure Shell

the ssh scp sftp everything should be in that and can be used.

Rgds

HGN
Rick Garland
Honored Contributor

Re: Can sftp and scp work together

I find very little difference (if any!) between sftp and scp.

sftp will transfer files being ASCII or BINARY without any user involvment. scp will do the same.

All I see different is the name of the tool.
rick jones
Honored Contributor

Re: Can sftp and scp work together

Make it work how exactly? At the risk of opening my mouth and confirming I am a fool :) the two are IIRC separate applications with separate application-level protocols. On the surface it seems rather like asking how one can configure ftp to make it work with rcp.

I suspect that the manpages for scp and/or sshd may have some pointers on configuration. Especially if SAM has not been taught how to do it yet. docs.hp.com may have some useful stuff as well.
there is no rest for the wicked yet the virtuous have no pillows
Mel Burslan
Honored Contributor

Re: Can sftp and scp work together

In my experience, the workability of the two protocols together is dependent on the client you use. I personally use winscp to transfer files back and forth from my workstation running the OS from the dark side and it has an option that you can select, saying, use SFTP wit an SCP fall back possibility. It has nothing to do with my hpux servers.

HTH
________________________________
UNIX because I majored in cryptology...
Denver Osborn
Honored Contributor

Re: Can sftp and scp work together

ok, so the problem here is to figure out a way to create one user account but restrict them to scp or sftp access only. Shell access will be denied. Is this right? You've already figured out how to restrict to sftp, but need to get the scp only portion working.

I've done this for scp restricted access before. Here's a url for the wrapper I used as my template.

http://www.snailbook.com/faq/scp-wrapper.txt

I remember it took some tweaking it where I needed it for my user on hp-ux, but it worked. I'll dig around for the wrapper I had working and post it if I find it.

You should be able to get it working if you use the sftp-only and add an else statement that will perform the scp only check.

Hope this helps,
-denver

Chris Cruz_1
Occasional Advisor

Re: Can sftp and scp work together

Thanks for everyone's reply.

Denver, if you do find the wrapper you had working I would very much appreciate it if you can post it here. I think that will help a lot.

Regards,
Chris
Denver Osborn
Honored Contributor

Re: Can sftp and scp work together

Chris,

attached is a slightly modified scponly wrapper that I had running on a hpux 11i box to restrict a user account to allow scp only access. Can't remember exactly how I had it used, but I think I limited the account to only allow public-key auth, then put the scponly in the authorized_keys file as the command to run... for what it's worth, hope this helps w/ your sftp/scp only access.

-denver