ssh

A command does not finish when executed using Python Paramiko exec_command

微笑、不失礼 提交于 2021-02-04 21:06:15
问题 I've got a Python program which sits on a remote server which uploads a file to an AWS bucket when run. If I ssh onto the server and run it with the command sudo python3 /path/to/backup.py it works as expected. I'm writing a Python program to automate a bigger process which includes running backup.py. I created a function to do this using the paramiko library. This is where the command gets run ssh_stdin, ssh_stdout, ssh_stderr = self.ssh.exec_command('sudo python3 /path/to/backup.py', 1800)

SCP says file has downloaded, but the file does not appear

 ̄綄美尐妖づ 提交于 2021-02-04 19:41:45
问题 I am using ssh to work on a remote server, however when I try to download a file using scp in this format: scp name@website.com:somefile.zip ~/Desktop It asks me for my password, and shows this: somefile.zip 100% 6491 6.3KB/s 00:00 however, this file never appears on my desktop. Any help 回答1: I think that you are logging into the remote machine using ssh and then running the command on the remote machine. You should actually be running the command without logging into your remote server first

SCP says file has downloaded, but the file does not appear

不羁的心 提交于 2021-02-04 19:39:06
问题 I am using ssh to work on a remote server, however when I try to download a file using scp in this format: scp name@website.com:somefile.zip ~/Desktop It asks me for my password, and shows this: somefile.zip 100% 6491 6.3KB/s 00:00 however, this file never appears on my desktop. Any help 回答1: I think that you are logging into the remote machine using ssh and then running the command on the remote machine. You should actually be running the command without logging into your remote server first

How to automate challenge-response authentication using Java

余生颓废 提交于 2021-02-04 19:35:26
问题 I have Linux phone with enabled SSH. I need to connect to it via challenge-response authentication. So how looks this process manually, for example, using PuTTY: Connect to phone using IP and port. Console shows "login as:" -> Enter user name. Console shows: login as: craft Challenge: 547-04302 Product ID: 7000315107 Response: I need to copy Challenge, get Response from other server using Challenge and enter the Response in console. How I can do this using Java and some libraries for SSH (I

How to add ssh passphrase to Docker and removed it after it was used?

会有一股神秘感。 提交于 2021-02-04 16:31:15
问题 The problem sounds elementary in its nature but I cannot find a secure and simple solution. The issue is the following, I have a project and I want to pull dependencies from private git repos to build a runtime environment and remove both SSH key and SSH passphrase afterward. I cannot skip passphrase as it is enforced by git remote repos. I struggle to push the SSH passphrase, so the SSH won't ask for a passphrase I struggle to understand how to do it securely The question of how can I do it,

How to add ssh passphrase to Docker and removed it after it was used?

99封情书 提交于 2021-02-04 16:31:14
问题 The problem sounds elementary in its nature but I cannot find a secure and simple solution. The issue is the following, I have a project and I want to pull dependencies from private git repos to build a runtime environment and remove both SSH key and SSH passphrase afterward. I cannot skip passphrase as it is enforced by git remote repos. I struggle to push the SSH passphrase, so the SSH won't ask for a passphrase I struggle to understand how to do it securely The question of how can I do it,

Why is Paramiko raising EOFError() when the SFTP object is stored in a dictionary?

…衆ロ難τιáo~ 提交于 2021-02-04 13:38:47
问题 I'm having trouble with an application I'm writing that downloads and uploads files to and from other boxes via SSH. The issue I'm experiencing is that I can get (download) files just fine but when I try to put (upload) them onto another server I get an EOFError() exception. When I looked at _write_all() in paramiko\sftp.py it seemed like the error was caused when it couldn't write any data to the stream? I have no network programming experience so if someone knows what it's trying to do and

Heroku keys “Cannot read property 'run' of undefined”

本小妞迷上赌 提交于 2021-02-04 04:41:07
问题 I'm trying to use the Heroku cli "keys" functions to upload a ssh key to my account. Unfortunately I run into the following error whenever I try to use any of the keys methods. TypeError: Cannot read property 'run' of undefined at Object.<anonymous> (C:\Users\Administrator\AppData\Local\heroku\tmp\heroku-script-292666295:14:4) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:456:32) at tryModuleLoad (module.js:415:12) at

Heroku keys “Cannot read property 'run' of undefined”

假如想象 提交于 2021-02-04 04:35:27
问题 I'm trying to use the Heroku cli "keys" functions to upload a ssh key to my account. Unfortunately I run into the following error whenever I try to use any of the keys methods. TypeError: Cannot read property 'run' of undefined at Object.<anonymous> (C:\Users\Administrator\AppData\Local\heroku\tmp\heroku-script-292666295:14:4) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:456:32) at tryModuleLoad (module.js:415:12) at

Is it possible to open VSCode from Windows terminal while SSH'ed into a virtual machine?

孤街浪徒 提交于 2021-01-29 19:56:36
问题 I'm working on some tutorials and trying to do something, but no idea if it can be done. I am using windows terminal in Windows 10. I have an Ubuntu virtual machine running. I'd like to: Open Windows terminal SSH into the Linux Virtual Machine Type in the code . command and have it open a version of VS Code on my Windows PC that is working on the folder in the Ubuntu VM. I tried install code locally and on the command line in the other machine, but it doesn't work. I am sure there are other