ssh

Connecting to port 21 with Paramiko and got paramiko.ssh_exception.SSHException: Error reading SSH protocol banner

Connecting to port 21 with Paramiko and got paramiko.ssh_exception.SSHException: Error reading SSH protocol banner Question: I’m trying to connect to am SFTP server through Paramiko. I don’t have a host key. The following code is my attempt and it’s giving me an error that says: paramiko.ssh_exception.SSHException: Error reading SSH protocol banner I notice that port …

Total answers: 1

Paramiko authentication fails with "Agreed upon 'rsa-sha2-512' pubkey algorithm" (and "unsupported public key algorithm: rsa-sha2-512" in sshd log)

Paramiko authentication fails with "Agreed upon 'rsa-sha2-512' pubkey algorithm" (and "unsupported public key algorithm: rsa-sha2-512" in sshd log) Question: I have a Python 3 application running on CentOS Linux 7.7 executing SSH commands against remote hosts. It works properly but today I encountered an odd error executing a command against a "new" remote server (server …

Total answers: 5

Reading command output with Paramiko invoke_shell/send/recv never finishes

Reading command output with Paramiko invoke_shell/send/recv never finishes Question: I am trying to use send/recv function in Paramiko. According to what I see, the line throws an exception of timeout Evaluating: self.shell.recv(1024) did not finish after 3.00 seconds. tmp = shell.recv(1024) What is wrong with the function implementation? My exit condition from while True is …

Total answers: 1

Paramiko can't find keys from ssh-agent on Windows

Paramiko can't find keys from ssh-agent on Windows Question: I am trying to connect to a test device on my local network using paramiko and SSH. If I specify the filename of my key and its passphrase, I can connect to the device without a problem. However, since my script is meant to run on …

Total answers: 1

Running local PowerShell script on remote SSH server

Running local PowerShell script on remote SSH server Question: I am wondering if it is possible to run a local PowerShell script on the remote server that I SSH into. This preferably has to be done over a script like Paramiko where I can just run the Paramiko Python script and it does everything – …

Total answers: 1

Jupyter opens a 'dead' notebook interface: cannot create a new one, or open an existing

Jupyter opens a 'dead' notebook interface: cannot create a new one, or open an existing Question: So after following all the instructions, the token finally worked, and I’m looking at this: This is very embarrassing. I tried running an existing notebook: jupyter notebook nbk.ipynb with the same result. I also opened a new notebook within …

Total answers: 2

Python SSH tunnel into EC2 and connect to DocumentDB

Python SSH tunnel into EC2 and connect to DocumentDB Question: I have been attempting to SSH tunnel into an EC2 instance and connect to DocumentDB that is located in the same VPC. I’ve tried all of the solutions I could dig up online with no luck. I am using the ssh_pymongo module, which wraps SSHTunnelForwarder. …

Total answers: 2

How to use Paramiko with host definition in ~/.ssh/config?

How to use Paramiko with host definition in ~/.ssh/config? Question: For my SSH connections, I use this ~/.ssh/config: Host gwhost Hostname gw.hostname.com User user IdentityFile /home/user/.ssh/priv_key ControlMaster auto ControlPath ~/.ssh/%h-%p-%r.sock ControlPersist 120 Host *.my-example.com User user IdentityFile /home/user/.ssh/priv_key StrictHostKeyChecking no ProxyCommand ssh -q ‘gwhost’ -W %h:22 From the terminal I can connect to the host …

Total answers: 1

How to get a free/open local port on Win10 / powerhsell for ssh forwarding

How to get a free/open local port on Win10 / powerhsell for ssh forwarding Question: I come from a Unix world and want to do ssh port forwarding ssh -L on a Windows 10 machine. I have a working solution with a python one-liner. Now I wanted to ask the Powershell-users how to elegantly do …

Total answers: 1