Questions tagged [twisted.conch]

Conch is an SSHv2 implementation written in Python.

Conch is an SSHv2 implementation written in Python. SSH is a protocol designed to allow remote access to shells and commands, but it is generic enough to allow everything from TCP forwarding to generic filesystem access.

32 questions
5
votes
1 answer

Extract Publickey from Privatekey input using Python

I need to generate publickey from a private key without temporary location locally like we do in sshgen.So i use this.Here iam passing my private key as input like this(while executing): python codekey.py "-----BEGIN RSA PRIVATE…
Doefi
  • 79
  • 1
  • 4
  • 10
5
votes
1 answer

Scripting with Twisted's manhole

Summary: Unable to automate commands to Twisted's manhole. Seeking solutions/advice. Twisted has a great piece of functionality called manhole. It allows the user to ssh to a currently running Twisted server and inspect/interact with its…
ChaimKut
  • 2,759
  • 3
  • 38
  • 64
5
votes
2 answers

What is the correct way to close a Twisted conch SSH connection?

What is the correct way to close a Twisted conch SSH connection? Is there an explicit way to do this? All of the Twisted conch examples I have seen close the SSH channel then stop the reactor. The reactor shutdown seems to handle closing the…
Vye
  • 203
  • 1
  • 4
  • 10
4
votes
1 answer

Twisted ssh server authentication using keys

Here is a simple twisted application: from twisted.cred import checkers, portal from twisted.conch import manhole, manhole_ssh from twisted.conch.insults import insults from twisted.application import service, internet from twisted.internet import…
Maxim
  • 1,783
  • 2
  • 14
  • 24
3
votes
1 answer

Receiving extended data with ssh using twisted.conch as client

I'm currently in the process of learning ssh via the brute-force/ just keep hacking until I understand it approach. After some trial and error I've been able to successfully send a "pty-req" followed by a "shell" request, I can get the login…
David
  • 17,673
  • 10
  • 68
  • 97
3
votes
1 answer

SSH server on Python

I need a simple example of a ssh server on python. I do not know much English, I find it difficult to understand the documentation. I tried to use paramiko and twisted conch. Help me, please. I find this, but documentation does not describe the…
user2503536
  • 95
  • 2
  • 6
2
votes
1 answer

Track IP of ssh login attempts with twisted.conch

I am attempting to capture ssh bruteforce attempts using a simple ssh server, the code is bellow and works, I am however unable to match Username/Password combinations with their originating IP address. This is as simple as I can get it thus far,…
Trowalts
  • 119
  • 1
  • 2
  • 10
2
votes
1 answer

Emulate an Interactive SSH client using Paramiko / Twisted

I need to emulate SSH client and log the entered commands. I have followed different links but most of the examples are related to automating tasks. For testing purpose, I need to emulate an Interative SSH Session and log commands. Note: Paramiko is…
Asim Khan
  • 23
  • 4
2
votes
1 answer

Python SSH Server( twisted.conch) takes up high cpu usage when a large number of echo

I write a SSH server with Twisted Conch. But encountered a difficult problem. Assume that user A and user B log in to the twisted ssh server through ssh command. Then user A tail or cat a large file (greater than 100M) on the server, which will…
chzijian
  • 21
  • 5
2
votes
2 answers

Python SSH server (twisted.conch) command filtering and port forwarding

I need to create an SSH server (twisted.conch has been chosen for the job) which would do the following: Perform port forwarding (the attached code does not do that and I do not know what to modify) Filter commands BEFORE they are executed (or at…
Daniel
  • 21
  • 1
  • 4
2
votes
1 answer

twisted conch trial TDD, "StringTransport instance has no attribute..."

I am working on setting up a configurable SSH stub shell, similar to MockSSH, and I want to do it test-driven. I am running into issues testing when I use conch.recvline.HistoricRecvLine instead of the base twisted.internet.protocol.Protocol #…
Lundy
  • 663
  • 5
  • 19
2
votes
2 answers

Use of the ISFTP interface of twisted conch to perform download and upload?

I am working to program a SFTP client using twisted conch. I have found an example using the FileTransferClient class of twisted conch in this (twisted conch filetransfer). The openFile method of this class return an Object that adheres to ISFTP…
Sanfo
  • 21
  • 2
2
votes
0 answers

Is twisted conch available in python 3?

I noticed twisted.conch is not part of dist3.py for python 3.Is it not yet migrated to python 3? I dont find any recent updates on the same when i search. I was planning to use it to establish multiple telnet sessions which ll help asses logs in my…
vinu
  • 21
  • 2
2
votes
1 answer

how to tunnel any Twisted protocol (say HTTP) inside SSH using Twisted?

I would like to make HTTP requests over SSH tunnels using Twisted. I have seen examples of using Twisted to set up SSH local port forwarding, but that's not what I am after. Instead, it seems to me it should be possible using Twisted to wrap the…
Petri
  • 4,796
  • 2
  • 22
  • 31
2
votes
1 answer

How to manage Twisted SSH server connections

I need to create twisted SSH server that accepts several commands. But the main feature is that server should manage connection. To be more specific, it needs to close open connection if it lasts for more than 10 minutes (for example). Or it should…
sefm
  • 21
  • 1
1
2 3