Use this tag for questions about PSFTP, a PuTTY tool used to transfer files between computers over SSH.
Questions tagged [psftp]
59 questions
19
votes
10 answers
Respond y(es) to psftp host key prompt
I am creating a script file programmatically and call psftp.exe as follows:
psftp user@hostname.com -pw password -b psftpscript.txt
but it prompts for user input
The server's host key is not cached in the registry. You have no
guarantee that the…

coder
- 4,121
- 14
- 53
- 88
18
votes
2 answers
Batch file for PuTTY/PSFTP file transfer automation
I have a batch file for moving file from my local PC to server through SFTP. I have PuTTY installed in my system and the batch file code follows.
cd C:\Program Files (x86)\PuTTY
psftp
open
cd…

suresh
- 303
- 2
- 4
- 14
6
votes
1 answer
Unable to upload all files using wildcards with psftp
I wish to upload all files in C:\Users\myuser\Downloads\SFTP folder on my local Windows to remote SFTP server myfolder directory.
I have multiple issues running sftp on Windows and achieving the above.
Below is my command:
C:\putty\psftp.exe -b…

Ashar
- 2,942
- 10
- 58
- 122
4
votes
1 answer
psftp says "The server's host key is not cached in the registry"
I'm getting the following message when trying to connect to an SFTP server from PowerShell using psftp:
Error:
psftp.exe : The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is.
…

curtcab
- 73
- 1
- 2
- 11
3
votes
1 answer
Unable to ignore errors using psftp
I wish to upload all files in C:\Users\myuser\Downloads\SFTP folder on my local Windows to a remote SFTP server's myfolder directory.
Below is my command:
C:\putty\psftp.exe -b C:\putty\sftp_commands.txt -l myuser -pw mypass 10.8.44.86
Here is my…

Ashar
- 2,942
- 10
- 58
- 122
3
votes
1 answer
Using 'for' command to find and download the latest file on SFTP server in PSFTP
I have gone through the following guide to set up an SSIS package to retrieve a text file located on an SFTP server:
https://www.mssqltips.com/sqlservertip/3435/using-sftp-with-sql-server-integration-services/
To summarize, the SSIS package executes…

Reddy
- 481
- 1
- 7
- 20
3
votes
1 answer
"Unable to open (file)" [psftp]
First things first this probably isn't a permission issue. You can check the image to see that for the most part I have permission to read & write at all levels of directories leading up to the file and the file itself.
The problem likely isn't the…

user160110
- 131
- 1
- 3
3
votes
1 answer
PuTTY psftp command line with proxy authentication
Any idea how to connect below PuTTY psftp command with proxy authentication (SOCKS5)?
psftp username@host -P portnumber -pw password

FIROZ K A
- 111
- 4
- 13
2
votes
1 answer
Pysftp open command with port number fails with "invalid port"
I'm trying to use psftp (for the first time -- latest and greatest PuTTY installed), to connect to one of my servers. I'll call it example.com. On said server, I have sshd listening on a non-standard port (say, 1234). This works fine, since I can…

Johnny Canuck
- 143
- 6
2
votes
0 answers
Python PSFTP No hostkey for host x.x.x.x found
I am running Python 3.6.8 on RHEL 8
I am trying to connect to sftp on another server using this
#!/usr/bin/env python
import pysftp
myHostname = I.I.I.I
myport = PPPP
myUsername = xxx
myPassword = xxx
cnopts =…

user10364931
- 31
- 2
2
votes
1 answer
How do I change my default local directory (for psftp)?
How do I change my default local directory in PSFTP? I know how to open the application and change my local directory with lcd C:\where\I\want\to\go, but I want every session to automatically run that command, or not need that command run.

Seth Reuter
- 85
- 1
- 9
2
votes
1 answer
Batch file not executing psftp commands
I am trying to upload a file from my local system to an FTP which is configured in Linux machine using T-SQL cmd. I have created a batch file with the commands to be executed which is working correctly in cmd where it is not working in T-SQL while…

Perumaal Vinothkumar
- 21
- 1
- 3
2
votes
1 answer
Keep original documents' dates with PSFTP
I have downloaded some files with PSFTP from a SQL Server. The problem is that PSFTP changes the dates of creation/update and last modified of the files when downloading them in a local folder. For me it is important to keep the original dates. Is…

juanitowgm
- 43
- 2
- 8
2
votes
1 answer
Download complete directory command line psftp
I have to move a complete folder from one source to another destination.
I have tried mget * and xcopy, but neither works. Please suggest some snippets.
I'm using psftp to connect the SFTP server.
My code is:
cd Remote path
lcd Local path
mget…

suresh
- 303
- 2
- 4
- 14
1
vote
1 answer
PowerShell scripts just hangs without moving to next statement when trying to run psftp commands
I have a following PowerShell scripts which is to get a file from remote Linux server to local directory, using psftp and get commands. These two commands as standalone, works just fine. However, as a following script copy.ps1:
psftp…

Maven
- 14,587
- 42
- 113
- 174