SSH to a server and exit Python script (in the same shell) -


i'm running script that's determining login information me, , in end outputting login information need use.

i running script in terminal, , want ssh me credentials has, exit python script on computer , connect current terminal new server.

say have sshhost, sshuser , sshpass variables in script. how run ssh command in current terminal , connect server?

i tried subprocess , spur, didn't manage going.

i appreciate , in advance.

assuming python prints settings stdout;

#!/bin/sh export $(credentials.py) exec ssh hostname 

Comments

Popular posts from this blog

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -