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

  • Home
  • SEARCH
  • 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 8711297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:50:31+00:00 2026-06-13T04:50:31+00:00

I use paramiko module and I can simply put and get files to and

  • 0

I use paramiko module and I can simply put and get files to and from remote host. Is there the way I can copy the file between 2 remote hosts?
I have pem file on my local host so I can establish ssh to both hosts. Is there the way I can do it without (if possible) additional configuration on remote hosts – using SSH key and without passwords?

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
privkey = paramiko.RSAKey.from_private_key_file (path_to_priv_key_file)
ssh.connect(host, username = username,  key_filename=path_to_priv_key_file)

I have connection to remote host, but when I try

cmd = "scp –v /usr/local/1.py user1@hos1:/usr/local"
ssh.exec_command(cmd)

I get Permission denied (publickey).

  • 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-06-13T04:50:32+00:00Added an answer on June 13, 2026 at 4:50 am

    Basically you would like to have a password less connection between two machines.
    It is dangerous unless you can assure that no one else has access to the client machine.

    Take a look here how to create the password less connection I have described thee years ago in my blog.
    It will solve scp issue as well.

    http://greg-n-blog.blogspot.com/2009/10/ssh-and-scp-without-being-asked-for.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Paramiko to connect to a remote host and execute a
I'm attempting to use Paramiko (Python SSH library) to read a remote file, and
echo Something=Something > file I can use paramiko's exec_command to do cat , grep
I want use paramiko to ssh2 to a remote host by public-key authentication, I
is there a way to use Python paramiko package in order to scp or
Is there a way that I can use Python on Windows to execute shell
We are attempting to use the paramiko module for creating SSH tunnels on demand
Use OPENXML to get dt element in MSSQL 2005. How can I get xmlns:dt
I do not manage to use the Paramiko python module passing through its ssh
use C#,want to upload excel file on google doc. bellow syntax use to upload

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.