Passwordless ssh still asks for password when running as subprocess

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I had setup passwordless ssh (keygen) to access my remote workspace from my personal laptop. On the remote server, I do use an account with a password to connect. Setting up public/private key authentication allowed me to connect without having to type this password.



The Python script I am running uses subprocess.Popen() to ssh into this remote workspace again. However, it is not a passwordless ssh during this. I have checked my permissions and have tried to delete and recreate the keys, yet this still happens.



Below is the relevant piece of Python code.



subprocess.Popen(['ssh', machine_addr, 'cd ' + workspace +
'; python dispynode.py --serve 1 --clean --dest_path_prefix dispytmp_' + str(i)])







share|improve this question





















  • What do you mean when you say passwordless? The account you are trying to log in is really passwordless? Are you using ip based authentication? Are you using public/private key authentication?
    – andcoz
    Jun 14 at 15:23











  • I have clarified what I meant by passwordless. I am using key authentication.
    – jg925
    Jun 14 at 15:25






  • 1




    Is your key passphrase protected? Is the password ssh asks the remote host password or the key passphrase?
    – andcoz
    Jun 14 at 15:41











  • Before I set up the keys, I used a password to access the server.
    – jg925
    Jun 14 at 16:05






  • 1




    Are you using ssh-agent on the client to manage the SSH keys? If so, are you executing the Python script in an environment where the SSH_AUTH_SOCK environment variable is available? Are you executing your Python script as yourself or as another user?
    – Kusalananda
    Jun 14 at 16:09















up vote
1
down vote

favorite












I had setup passwordless ssh (keygen) to access my remote workspace from my personal laptop. On the remote server, I do use an account with a password to connect. Setting up public/private key authentication allowed me to connect without having to type this password.



The Python script I am running uses subprocess.Popen() to ssh into this remote workspace again. However, it is not a passwordless ssh during this. I have checked my permissions and have tried to delete and recreate the keys, yet this still happens.



Below is the relevant piece of Python code.



subprocess.Popen(['ssh', machine_addr, 'cd ' + workspace +
'; python dispynode.py --serve 1 --clean --dest_path_prefix dispytmp_' + str(i)])







share|improve this question





















  • What do you mean when you say passwordless? The account you are trying to log in is really passwordless? Are you using ip based authentication? Are you using public/private key authentication?
    – andcoz
    Jun 14 at 15:23











  • I have clarified what I meant by passwordless. I am using key authentication.
    – jg925
    Jun 14 at 15:25






  • 1




    Is your key passphrase protected? Is the password ssh asks the remote host password or the key passphrase?
    – andcoz
    Jun 14 at 15:41











  • Before I set up the keys, I used a password to access the server.
    – jg925
    Jun 14 at 16:05






  • 1




    Are you using ssh-agent on the client to manage the SSH keys? If so, are you executing the Python script in an environment where the SSH_AUTH_SOCK environment variable is available? Are you executing your Python script as yourself or as another user?
    – Kusalananda
    Jun 14 at 16:09













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I had setup passwordless ssh (keygen) to access my remote workspace from my personal laptop. On the remote server, I do use an account with a password to connect. Setting up public/private key authentication allowed me to connect without having to type this password.



The Python script I am running uses subprocess.Popen() to ssh into this remote workspace again. However, it is not a passwordless ssh during this. I have checked my permissions and have tried to delete and recreate the keys, yet this still happens.



Below is the relevant piece of Python code.



subprocess.Popen(['ssh', machine_addr, 'cd ' + workspace +
'; python dispynode.py --serve 1 --clean --dest_path_prefix dispytmp_' + str(i)])







share|improve this question













I had setup passwordless ssh (keygen) to access my remote workspace from my personal laptop. On the remote server, I do use an account with a password to connect. Setting up public/private key authentication allowed me to connect without having to type this password.



The Python script I am running uses subprocess.Popen() to ssh into this remote workspace again. However, it is not a passwordless ssh during this. I have checked my permissions and have tried to delete and recreate the keys, yet this still happens.



Below is the relevant piece of Python code.



subprocess.Popen(['ssh', machine_addr, 'cd ' + workspace +
'; python dispynode.py --serve 1 --clean --dest_path_prefix dispytmp_' + str(i)])









share|improve this question












share|improve this question




share|improve this question








edited Jun 14 at 16:02
























asked Jun 14 at 15:14









jg925

62




62











  • What do you mean when you say passwordless? The account you are trying to log in is really passwordless? Are you using ip based authentication? Are you using public/private key authentication?
    – andcoz
    Jun 14 at 15:23











  • I have clarified what I meant by passwordless. I am using key authentication.
    – jg925
    Jun 14 at 15:25






  • 1




    Is your key passphrase protected? Is the password ssh asks the remote host password or the key passphrase?
    – andcoz
    Jun 14 at 15:41











  • Before I set up the keys, I used a password to access the server.
    – jg925
    Jun 14 at 16:05






  • 1




    Are you using ssh-agent on the client to manage the SSH keys? If so, are you executing the Python script in an environment where the SSH_AUTH_SOCK environment variable is available? Are you executing your Python script as yourself or as another user?
    – Kusalananda
    Jun 14 at 16:09

















  • What do you mean when you say passwordless? The account you are trying to log in is really passwordless? Are you using ip based authentication? Are you using public/private key authentication?
    – andcoz
    Jun 14 at 15:23











  • I have clarified what I meant by passwordless. I am using key authentication.
    – jg925
    Jun 14 at 15:25






  • 1




    Is your key passphrase protected? Is the password ssh asks the remote host password or the key passphrase?
    – andcoz
    Jun 14 at 15:41











  • Before I set up the keys, I used a password to access the server.
    – jg925
    Jun 14 at 16:05






  • 1




    Are you using ssh-agent on the client to manage the SSH keys? If so, are you executing the Python script in an environment where the SSH_AUTH_SOCK environment variable is available? Are you executing your Python script as yourself or as another user?
    – Kusalananda
    Jun 14 at 16:09
















What do you mean when you say passwordless? The account you are trying to log in is really passwordless? Are you using ip based authentication? Are you using public/private key authentication?
– andcoz
Jun 14 at 15:23





What do you mean when you say passwordless? The account you are trying to log in is really passwordless? Are you using ip based authentication? Are you using public/private key authentication?
– andcoz
Jun 14 at 15:23













I have clarified what I meant by passwordless. I am using key authentication.
– jg925
Jun 14 at 15:25




I have clarified what I meant by passwordless. I am using key authentication.
– jg925
Jun 14 at 15:25




1




1




Is your key passphrase protected? Is the password ssh asks the remote host password or the key passphrase?
– andcoz
Jun 14 at 15:41





Is your key passphrase protected? Is the password ssh asks the remote host password or the key passphrase?
– andcoz
Jun 14 at 15:41













Before I set up the keys, I used a password to access the server.
– jg925
Jun 14 at 16:05




Before I set up the keys, I used a password to access the server.
– jg925
Jun 14 at 16:05




1




1




Are you using ssh-agent on the client to manage the SSH keys? If so, are you executing the Python script in an environment where the SSH_AUTH_SOCK environment variable is available? Are you executing your Python script as yourself or as another user?
– Kusalananda
Jun 14 at 16:09





Are you using ssh-agent on the client to manage the SSH keys? If so, are you executing the Python script in an environment where the SSH_AUTH_SOCK environment variable is available? Are you executing your Python script as yourself or as another user?
– Kusalananda
Jun 14 at 16:09
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449835%2fpasswordless-ssh-still-asks-for-password-when-running-as-subprocess%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449835%2fpasswordless-ssh-still-asks-for-password-when-running-as-subprocess%23new-answer', 'question_page');

);

Post as a guest













































































KzVUcXmnHzLF5dbR xVjdbPcoCYkQ46YDgrA00JKPszRJ 0Ov7V9SxQSIuzog bNdLp8GTX9eEUA
fv YtkJE24ab Dv8evq ZogdvARpyhJUWPBO09bII6TYGMd QK,KJh8bcsUzAmzgGcigxnPt9m 4KbGVwjI99C

Popular posts from this blog

How to check contact read email or not when send email to Individual?

How many registers does an x86_64 CPU actually have?

Displaying single band from multi-band raster using QGIS