Re: sftp password authentication question

From: Nico Kadel-Garcia (nkadel@bellatlantic.net)
Date: 12/07/02


From: "Nico Kadel-Garcia" <nkadel@bellatlantic.net>
Date: Sat, 07 Dec 2002 02:53:01 GMT


"barabba" <barabba72@hotmail.com> wrote in message
news:8ec33ba5.0212060826.361a1c4b@posting.google.com...
> Hi all,
>
> I have a big problem for which I hope somebody can help me out.
> I have a W2k server machine (equippend with SSH Secure Shell) which
> needs to send some logs to another similar machine (equipped with
> NetworkSimplicity SSH server). The authentication method is password
> (this implementation cannot use public key authentication).
>
> Nevertheless, I would like to automate this process by feeding the
> sftp with a file containing the user/password and the put commands to
> execute.

Don't. First, replace the ssh.com software.com software with Cygwin and
OpenSSH. It's much more supported.

Second, rather than scripting a password (Bad admin! No biscuit!), consider
using an ssh-agent to store the active key and/or a chroot cage on the
server to keep the user with unencrypted or other key access from poking
around the rest of your system.

> The problem is that I tried this but I only manage to either automate
> the authentication or the command process but not both. I know this
> can be apparently easily accomplished with normal FTP. How do I get
> this to work with SFTP or SFTP2 ??? I tried all sort of syntax but to
> no avail.

sftp is not FTP. It has little to nothing to do with FTP, it's simply a
confusingly named *other* system for transferring files back and forth
interactively. And instead of sftp, you can use "scp", "rsync -e ssh", and
other options to transfer the appropriate files back and forth. sftp
attempted to duplicate much of the functionality of normal ftp but is
lacking a bunch of these features because they're such very bad ideas in
security terms.



Relevant Pages

  • Re: SPAM sudden increase
    ... > Dude was on a tech call with f-secure and the tech asked, "So, ... dude is trying to FTP to their server using WSFTP. ... but I think he is talking about sftp protocol - FTP via ...
    (alt.2600)
  • using java with sftp
    ... JCraft JSch package to SFTP files. ... //First Create a JSch session ... System.err.println("Unable to connect to FTP server. ...
    (comp.lang.java.programmer)
  • Re: using java with sftp
    ... JCraft JSch package to SFTP files. ... //First Create a JSch session ... System.err.println("Unable to connect to FTP server. ...
    (comp.lang.java.programmer)
  • Re: Pasting via ssh causes data loss
    ... sftp of the file to the remote and ... I then opened an ssh session to a FreeBSD ... errors shown on the interface of the server? ...
    (freebsd-questions)
  • sftp speed degradation with ZA?
    ... I'm using sftp on Cygwin_ME-4.90 ... normal ftp. ... The ssh version on the solaris box is ... to me that ZA is the reason for the bandwidth ...
    (comp.security.firewalls)