Solved

Putty SFTP: one line command to access an SFTP server

Posted on 2008-10-08
4
5,569 Views
Last Modified: 2013-12-02
Is it possible to specify a one line command in putty sftp that handles connecting to a host and username/password authentication? I have tried the following command and it fails:

psftp user@212.x.x.52 -pw password12345

We are using global scape FTP secure server 3.3 as the destination FTP server to conenct to (is there a setting that needs to be enabled to allow command line sftp connections). The FTP login details are correct. Any information appreciated.
0
Comment
Question by:rmullins83
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:kukno
ID: 22669519
did you try the option -pw ?


PuTTY Secure File Transfer (SFTP) client
Release 0.60
Usage: psftp [options] [user@]host
Options:
  -V        print version information and exit
  -pgpfp    print PGP key fingerprints and exit
  -b file   use specified batchfile
  -bc       output batchfile commands
  -be       don't stop batchfile processing if errors
  -v        show verbose messages
  -load sessname  Load settings from saved session
  -l user   connect with specified username
  -P port   connect to specified port
  -pw passw login with specified password
  -1 -2     force use of particular SSH protocol version
  -4 -6     force use of IPv4 or IPv6
  -C        enable compression
  -i key    private key file for authentication
  -noagent  disable use of Pageant
  -agent    enable use of Pageant
  -batch    disable all interactive prompts

Regards
Kurt
0
 

Author Comment

by:rmullins83
ID: 22669610
I did include the pw parameter in the question:

psftp user@212.x.x.52 -pw password12345

But it fails if I try to connect using the -pw paraneter. If use the psftp user@212.x.x.52 then it will request a password and connect successfully. I need a 1 line command to do all of this in one go and connect to the sftp server.
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22669692
0
 
LVL 10

Accepted Solution

by:
kukno earned 500 total points
ID: 22673976
>I did include the pw parameter in the question:
>
>psftp user@212.x.x.52 -pw password12345

Oops, sorry :-) However -pw should work, BTW: You'll have to place the options (-pw) in front of the user@server part!

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction People like FTP.  It's a solid, stable, robust protocol for quickly transferring files between two hosts using TCP/IP.  In most cases it's much faster than SMB or CIFS, and certainly much easier to set up between organizations.  This…
If, like me, you have a lot of Dell servers in the estate you manage this article should save you a little time. When attempting to login to iDrac on any server I would be presented with two errors. The first reads "Do you want to run this applicati…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question