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
Matplotlib and non-ascii characters
How does HttpResponse(status=<code>) work in django?
Write a CSV from Urlib and manage encoding properly
python - list index out of range, working with CSV?
Pandas DataFrame get substrings from column
Python GET is not working in browser
Django, Pinax, couldn't extract file
Getting proper list of members from pymongo
Not writing into an Excel file
How to integrate my python plugin with nagios
Find words containing . in middle or at the end
Using apply on a column
Maximum-sum subarray given constraints on indices
Converting text to columns
easily make labels look nice pandas plotting
checking if a file exists with a variable on python