Passwordless ssh still asks for password when running as subprocess
Clash 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)])
ssh python
add a comment |Â
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)])
ssh python
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 usingssh-agent
on the client to manage the SSH keys? If so, are you executing the Python script in an environment where theSSH_AUTH_SOCK
environment variable is available? Are you executing your Python script as yourself or as another user?
â Kusalananda
Jun 14 at 16:09
add a comment |Â
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)])
ssh python
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)])
ssh python
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 usingssh-agent
on the client to manage the SSH keys? If so, are you executing the Python script in an environment where theSSH_AUTH_SOCK
environment variable is available? Are you executing your Python script as yourself or as another user?
â Kusalananda
Jun 14 at 16:09
add a comment |Â
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 usingssh-agent
on the client to manage the SSH keys? If so, are you executing the Python script in an environment where theSSH_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
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 theSSH_AUTH_SOCK
environment variable is available? Are you executing your Python script as yourself or as another user?â Kusalananda
Jun 14 at 16:09