Antony's Logo

Antony's pages of stuff

  • Geek Home
  • HTML & Web Code
    • 2d Canvas
    • 3d Canvas
    • Javascript
  • Command Line
    • Windows CL
    • Windows CL Elevated
    • Windows Powershell
    • Unix & Linux
  • Other Stuff
    • Electronics
    • TV & Radio
    • Excel
    • Powerpoint
    • Word
  • Contact

F*@#ing PSFTP



Things I have found out whilst learning about PSFTP



What about PSFTP ?

There are different types of PSFTP.

Lets Look at Putty's Version.

PuTTY SFTP client (PSFTP) is a command line secure ftp program.
A tool for transferring files securely between computers using an SSH connection using the SSH port.

Working With PSFTP

First you need to ensure Putty folder is in the PATH (C:\Program Files;C:\Winnt;C:\Winnt\System32)if not add.

set PATH=C:\path\to\putty\directory;%PATH%
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\053550>psftp user@server.com
Using username "user".
user@server.com's password:
Remote working directory is /home/user
psftp>

To Check directory use pwd (present working directory)

psftp> pwd
Remote directory is /home/user
psftp>

To Check local directory use lpwd (local present working directory)

psftp> lpwd
Current local directory is C:\Users\user
psftp>

To Change local directory use lcd

psftp> lcd Documents
New local directory is C:\Users\user\Documents
psftp>

To Change Remote directory use cd foldername

To List Remote directory use dir

To List Local directory use !dir

The quit command ends your session
When you have finished your session, type the command quit to close the connection, terminate PSFTP and return to the command line.
You can also use the bye and exit commands, which have exactly the same effect.

If you just want to close the network connection but keep PSFTP running,
you can use the close command. You can then use the open command to open a new connection.

The get put commands are used to send and receive files
You can

psftp> 
psftp: no hostname specified; use "open host.name" to connect
psftp> open your_server.com
login as: user
Using keyboard-interactive authentication.
Password:
Remote working directory is /user
psftp> get /home/user/filename.ext
remote:/home/user/filename.ext => local:filename.ext
psftp>

PowerShell PSFTP.

The PSFTP module allow you to connect and manage the contents of ftp account.
The add on Powershell Module contains a set of functions to:

  • get list of items,
  • Download Files
  • Send files

The Module can be installed manualy by downloading Zip file and extract in two places:

  • %USERPROFILE%\Documents\WindowsPowerShell\Modules
  • %WINDIR%\System32\WindowsPowerShell\v1.0\Modules

Link to zip download PSFTP.zip

more details at Microsoft Technet page Here

Other

Jump to Command Line and me on....

  • PSFTP

Jump to Ubuntu, Linux and me on....

  • Uncomplcated Fire Wall (UFW)
  • Fail2ban
  • HandBrakeCLI
  • Screen
  • htpassword
  • apt
  • Nginx
  • CHOWN
  • youtube-dl
  • vi

by Ant Monkey on Juice © 

Contact me here