SSH to a server and exit Python script (in the same shell)
I'm running a script that's determining login information for me, and in the end is outputting the login information that I need to use. I am running the script in a terminal, and now I want it to SSH me with the credentials it has, exit the Python script on my computer and connect my current terminal to the new server. Say I already have my sshHost, sshUser and sshPass as variables in the script. How do I run an SSH command in the current terminal and connect to that server? I tried subprocess and spur, however I didn't really manage to get that going. I would really appreciate your help and thanks in advance.
assuming the python prints the settings to stdout; #!/bin/sh export $(credentials.py) exec ssh hostname
OSError when trying to delete keys from redis
remove/reset matplotlib quiver arrows
Repeating elements in a list
Run python-rq worker process on application start
Chrome Not Starting When Using ChromeDriver
How to selectively iterate over files with Python
I'm having trouble using docker-py in a development environment on OSX
How to query AWS to get ELB names and attached instances to that using python boto modules?
Pi Wireless AP is dropping shortly after boot
How to redirect python logging output to file instead of stdout?
Matplotlib- Any way to use integers AND decimals in colorbar ticks?
ImportError: No module named setuptools.command on Mac OS X within virtualenv
Numpy Minimize COBYLA Constraints
Pyside Installation “Failed to find the MSVC compiler version 10.0 on your system”
How to do a group by operation on a list of json objects in python?
How to pass enum as argument in ctypes python?