Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Putty SFTP: one line command to access an SFTP server

Posted on 2008-10-08
4
Medium Priority
?
5,582 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 1500 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Goal:  To set up a secure SSH server for your home computer to make it accessible anywhere AND to use it as a port forwarding proxy. Steps 1.  WinSSHD version 5 is free for personal use.  So download and install it.  You can download it from the…
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…
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.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

604 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