Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6330557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:53:35+00:00 2026-05-24T17:53:35+00:00

I have a sftp program called transmit. I use it to access a sftp

  • 0

I have a sftp program called transmit. I use it to access a sftp server. I log in with username, password and everything works fine. I can delete, create and see everything.

Now I must access this sftp server with a python script. Therefore I installed parmiko. I set up everything as in the demo file but I strangly get the error message permisson denied:

hostname = "123.456.789.1"
port = 22

hostkeytype = None
hostkey = None
try:
    host_keys = paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts'))
except IOError:
    print '*** Unable to open host keys file'
    host_keys = {}

if host_keys.has_key(hostname):
    hostkeytype = host_keys[hostname].keys()[0]
    hostkey = host_keys[hostname][hostkeytype]
    print 'Using host key of type %s' % hostkeytype

t = paramiko.Transport( (hostname, port) )
t.connect( username="customUser", password="xyzpasswd", hostkey=hostkey, pkey=None )
sftp = paramiko.SFTPClient.from_transport(t)
print sftp.listdir() # <- works
sftp.get("~/myfolder/test.png",".", None ) # <- permission denied error
t.close()

And this is the output if I run it:

Using host key of type ssh-dss
['.ssh2', 'archiv', 'myfolder']
Traceback (most recent call last):
File "/path/to/myscript.py", line 539, in <module>
main()   
File "/path/to/myscript.py", line 531, in main
ladeDatenVomSFTPServer()   
File "/path/to/myscript.py", line 493, in ladeDatenVomSFTPServer
sftp.get("~/myfolder/test.png",".", None )
File "build/bdist.macosx-10.6-intel/egg/paramiko/sftp_client.py", line 606, in get
File "build/bdist.macosx-10.6-intel/egg/paramiko/sftp_client.py", line 245, in open
File "build/bdist.macosx-10.6-intel/egg/paramiko/sftp_client.py", line 635, in _request
File "build/bdist.macosx-10.6-intel/egg/paramiko/sftp_client.py", line 682, in _read_response
File "build/bdist.macosx-10.6-intel/egg/paramiko/sftp_client.py", line 712, in _convert_status
IOError: Permission denied, file: ~/myfolder/test.png

This all works fine in Transmit but with parmiko it fails. What did I wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:53:36+00:00Added an answer on May 24, 2026 at 5:53 pm

    I think the second argument should be a filename, instead of a dot .

    Replace

    sftp.get("~/myfolder/test.png",".", None )
    

    with something like

    sftp.get("~/myfolder/test.png","~/test.png", None )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need to be able to SFTP though VBA. I have an Access program
How I can make SFTP transport through SSHClient on the remote server? I have
I have connected to a server via SFTP using FileZilla and accepted adding the
Is there a Java library that can be used to implement an SFTP server?
Can anyone recommend a decent SFTP library for use with Windows C++ apps? If
I am looking for a windows FTP/SFTP server software that I can administrate (partly)
I'm writing a batch file that runs the below command winscp sftp://username:password@host.com:22 /privatekey=pgp530.ppk The
This is ASP classic, not .Net. We have to get a way to SFTP
Have you ever seen any of there error messages? -- SQL Server 2000 Could
i have a working solaris 10 server with ssh and NIS using the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.