Questions tagged [asyncssh]
15 questions
4
votes
4 answers
Can not connect via AsyncSSH, error Host key is not trusted
When I run this script I receive SSH connection failed: Host key is not trusted error, but even connect to this host to take the key, keep to receive this error.
import asyncio, asyncssh, sys
async def run_client():
async with…

Hasunohana
- 565
- 8
- 22
3
votes
1 answer
asyncio loops: how to implement asynio in an existing python program - and share variables/data?
My application needs remote control over SSH.
I wish to use this example: https://asyncssh.readthedocs.io/en/latest/#simple-server-with-input
The original app is rather big, using GPIO and 600lines of code, 10 libraries. so I've made a simple…

user105939
- 209
- 2
- 7
1
vote
0 answers
Transfer files directly from one SFTP server to another?
I have files within directories that needs to be transferred from one SFTP server to another. Common ways I have found are to download the files from server 1 and then transfer them to server 2. My goal is to automate the transfer using serverless…

Safiul Alam
- 33
- 4
1
vote
0 answers
Downloading large datafrom SFTP server to Google Cloud Storage using AsyncSSH fails
I'm using Python's AsyncSSH library to download files from an SFTP server and upload them to Google Cloud Storage using Cloud Functions. The code works fine when the number of files and directories is small. However, when I try to download a large…

Safiul Alam
- 33
- 4
1
vote
1 answer
Use AsyncSSH to collect files from multiple computers
I have a program, which collects various log-files from multiple computers into a single ZIP-file on the client machine. It is currently using Fabric and I'd like to rewrite it with AsyncSSH to make all the servers send their files in parallel.
What…

Mikhail T.
- 3,043
- 3
- 29
- 46
0
votes
0 answers
OSError: [Errno 24] Too many open files - Async Programing in Python
I am all new to asynchronous programing in Python. I am enhancing part of my code to work asynchronously where the rest of the code works synchronously. The part I am enhancing asynchronously is to upload n number of files to a sftp and S3 bucket.…

Tim
- 11
- 1
0
votes
0 answers
Issues with Remote SSH Connections and Command Execution using python and asychronous libraries like asyncssh and ibkr twsapi on linux
I have no idea where I should be asking this question, it seems like a very niche problem.
Here is my issue. I have been running a python script to run trades on interactive brokers using the tws api. I use python.
It works completely fine when I…

anarchy
- 3,709
- 2
- 16
- 48
0
votes
1 answer
How to do interactive "su -c command -" with AsyncSSH
I have successfully executed su -c whoami - using paramiko like such:
def amiroot(ssh: paramiko.client.SSHClient, root_pass: str) -> bool:
session = ssh.get_transport().open_session()
session.set_combine_stderr(True)
session.get_pty()
…

pepoluan
- 6,132
- 4
- 46
- 76
0
votes
0 answers
How to connect to database via asyncssh (Tunnel) and psycop2?
python 3.11 / asyncssh 2.13 / psycopg2-binary 2.9.5
After using the sshtunnel library i wanted to switch to the asyncssh library because its more maintained with newer Python Versions and brings async benefits.
After reading the asyncssh Doc i wrote…

black_hole_sun
- 908
- 11
- 41
0
votes
0 answers
Make an async ssh interactive shell sever in Python
My need is this: build a async-function-supported ssh server, which is running in the background as the server. Users can get access to it by ssh xxx@xxx.xxx.xxx.xxx, and then they will enter something like the Python IDLE(client), where they input…

Ron
- 21
- 2
0
votes
0 answers
SSHClientConnection.run(stderr=sys.stderr)? Can avoid closing sys.stderr?
It looks like SSHClientConnection.run closes stderr.
I assume:
This is a common use case
I shouldn't have to wrap stderr and mock close to avoid close being called.
Is there some way to call run that avoids .close being called?
async with…

user48956
- 14,850
- 19
- 93
- 154
0
votes
1 answer
Sending ASCII Control codes with asyncssh
I am writing a small test script that exercises asyncssh facilities. One of the test scenarios is running ping localhost process and then sending CTRL+\ to report intermediary summary. However I have been unsuccessful sending ASCII control codes.…

nndhawan
- 597
- 6
- 24
0
votes
0 answers
How to send Ctrl + / to the stdin in Linux via byte string in Python?
I know I can send b'\x03' to send CTRL + C to Linux but I don't know the code for CTRL + \. What resource covers CTRL + ?
By way of background, I am writing a small test script that exercises my python asyncssh application and I am using ping…

nndhawan
- 597
- 6
- 24
0
votes
0 answers
How to run a process in asyncssh and watch its output forever?
I created a simple asyncssh app that starts a process that runs continuously. I would like to get all stdout from the app as it runs but for some reason it ends part ways. I'm not sure if this means there is a limit of how much I can get from…

LeanMan
- 474
- 1
- 4
- 18
-1
votes
0 answers
Async SSH sftp returning error 0x00000010
when I try to connect to a server with async_ssh with the sftp command then I get the following error
from asyncssh import connect
import asyncio
sftp_conn_options = {
"host": "EXAMPLE HOST",
"username": "EXAMPLE USER",
"password":…