All Questions
78 questions
1
vote
0
answers
46
views
Cannot establish SSH Connection with String Public Key in Python
I'm trying to establish an SSH connection to a remote server with paramiko using a public key as a string and am getting a paramiko.ssh_exception.BadHostKeyException error.
Here is the code I am using:...
0
votes
1
answer
127
views
How to authenticate a Python package between two repos in GitHub and deploy
We have a private utility repo in GitHub and we would like to be able to install this package with a GitHub Actions. When developing locally I have created a ssh key, uploaded the public key to deploy ...
0
votes
1
answer
301
views
How to resolve BadHostKeyException with paramiko? [duplicate]
I have following code to connect to a linux box and run a command, But I'm facing
BadHostKeyException even after I have added WarningPolicy and AutoAddPolicy.
print("---CCCCCCCCCCCCC--...
1
vote
1
answer
198
views
Paramiko "UnicodeDecodeError" when authenticating with key from Pageant
Experiencing an issue when attempting to connect to a server using Paramiko and SSH agent Pageant. The error indicates that the script is failing during the connection attempt, specifically when ...
2
votes
1
answer
3k
views
How to pass a .pem key in GitHub actions via environment variable without characters causing YAML parsing issues
I have a GitHub environment secret {{ secrets.GITHUBAPP_KEY } that holds a .pem key, in a workflow step, I'm trying to pass the secret to an env variable GITHUBAPP_KEY
- name: Do Certain Step
...
0
votes
1
answer
331
views
Read private key from string using Paramiko
key_blob is not a string, not a StringIO(key_str), ... I figured it work when i pass
msg = paramiko.message.Message() as a key_blob
why does it want a msg there, any idea how to do this properly?
...
2
votes
2
answers
1k
views
Can I read private SSH key without knowing its type with paramiko?
I'm authenticating to remote server with paramiko.SSHClient by SSH key. For it I have several configs for different servers with paths to SSH keys. And it happened so that some of them are Ed25519 and ...
0
votes
1
answer
1k
views
Paramiko fails connecting /w "Private key file is encrypted" when upgrading to 2.9.0+
The following works fine using paramiko 2.8.1, but fails with any 2.9.0+:
pkey = paramiko.RSAKey.from_private_key(pkey_str)
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(...
2
votes
0
answers
1k
views
Generate SSH ed25519 private key with embedded comment
So I've been looking at modifying some existing code to make it compatible with Windows as well as Linux/MacOS. There is a generator which currently shells out to ssh-keygen via subprocess to produce ...
0
votes
0
answers
44
views
Connect to PostgreSQL online DB using Python [duplicate]
I am currently connecting to a PostgreSQL DB using Dbeaver.
However I want to connect to DB directly with Pyhton, so that I can automatize the data flow.
I have the following information field given (...
1
vote
1
answer
1k
views
Installing private GitHub repositories on DataBricks
I'm running Python wheels on Azure Databricks job. One of the wheel imports private repository from GitHub. Installation of wheel on Databricks cluster fails, as there is no SSH on Databricks.
What is ...
1
vote
1
answer
346
views
How to load pem from gateway with Fabric
I need to create a connection with Fabric 2 using 2 gateways.
c = Connection("user@IP", connect_kwargs={"key_filename": "xxxxx.pem"}, gateway=Connection("user@IP&...
0
votes
1
answer
287
views
How do we list all SSH keys against an Azure subscription from Python SDK?
Not sure how do we create NewEnvironmentCredential from client_id, client_secret and tenant_id.
I have done same thing for GO, but not able to do it in python:
func GetAzureKeyPairsAgainstRegion(ctx ...
-1
votes
1
answer
806
views
I can't connect to a server with pysftp
I would like to read files on a remote server using pysftp. For this I generated an ssh key on the server I want to connect to and added the public key to my code.
It worked fine before I changed my ...
5
votes
1
answer
6k
views
Pip install from Github broken after Github keys policy update
I would normally install a Python repository from Github using (for example):
pip install git+git://github.com/Artory/drf-hal-json@master
And concordantly, my "requirements.txt" would have ...