Open ali-zakaria opened 5 months ago
Work-around: Use subprocess and native ssh instead of paramiko
cmd = 'ssh -o StrictHostKeyChecking=accept-new -i "%s" %s@%s "%s"' % (ssh.server.pkeyPath, ssh.server.username, ssh.server.hostname, cmd_to_execute)
p = subprocess.Popen(cmd,
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
ssh_stdout, ssh_stderr = p.communicate()
Are you keeping any ssh related objects in the State? That pickling error is coming from reflex trying to pickle the state for redis (prod mode)
Yes I am reading a bench of ssh keys stored in text files and creating paramiko.RSAKey objects at initialization and keeping it in a dict
Are the SSH keys per user of the app or are they shared among users of the app?
The goal of the app is to manage ~100 servers. Each server RSA key is stored as plain text in App's server uploaded_files/ folder (self hosting)
Users (administrators of the servers) log to the app and choose the server they want to configure from a dropdown menu, at this point, the app reads the RSA key and opens an SSH connection to the chosen server
Describe the bug Cannot deploy app with "paramiko" as dependency.
Getting this error when running the application
To Reproduce
Deploy application with this requirement.txt
Expected behavior Application should run like in localhost:3000 mode
Specifics (please complete the following information):