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 6742107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:48:14+00:00 2026-05-26T11:48:14+00:00

I am trying to make a small module which opens an ssh connection and

  • 0

I am trying to make a small module which opens an ssh connection and allows to send commands over ssh and return the output of the command. Hereby, there should only be one ssh connection (so that multiple commands do not cause auto-blocks). I am aware of paramiko, but I cannot use it as I have to use python3.2 because of other constraints.

The module I wrote is here: http://kbicker.web.cern.ch/kbicker/ssh.py

In principle, it works. However, when using cat to read a text file, the program hangs. I determined that this is because reading a new line from the pty hangs. I assume, there is some kind of buffer problem, but I have no idea how to solve it.

I would also be grateful for any other advice on my code.

Thank you in advance for your help!

  • 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-26T11:48:15+00:00Added an answer on May 26, 2026 at 11:48 am

    Solved, or at least worked around it:

    By using a thread with the ssh -M option, I could have one Master ssh connection open and have commands open their own ssh subprocess, which connects through the master connection, thereby alleviating the need to open more than one connection.

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

Sidebar

Related Questions

I'm trying to make a small Flash game that has a GUI, which is
I'm trying to make a small Mosaic programm, that draws squares randomly all over
Hiya, I'm trying to make a small loop which presents an error when the
I am trying to make a small application for a project in which clients
im trying to make a small name summary function depending on the size of
I'm trying to make a small tool that makes use of the Debugger Engine
I'm trying to make a small program that could intercept the open process of
I'm currently trying to make a small application that performs different duties. Right now
I've been trying to get input with IUP to make a small pong game.
i m trying to make small test driven example by using cppunit. So i

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.