How to solve problem with ssh authentication?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am trying to login into remote server without password using ssh but I am get the error:
Permission denied (publickey)
To copy .pub key to the server, I had:
PasswordAuthentication = yes (in the sshd_config file).
After I copied the .pub key, the i disabled the password in the ssh_config I had:
PasswordAuthentication = no
Now when I tried to ssh:
ssh 'server@192.168.xx.x'
I was getting the error:
Permission denied (publickey)
How can I solve the problem?
I have changed the authorized_keys permission, the .ssh/ permission and so on, but the problem persist. I have even used the ssh-agent $SHELL && ssh-add command.
ssh
 |Â
show 1 more comment
up vote
0
down vote
favorite
I am trying to login into remote server without password using ssh but I am get the error:
Permission denied (publickey)
To copy .pub key to the server, I had:
PasswordAuthentication = yes (in the sshd_config file).
After I copied the .pub key, the i disabled the password in the ssh_config I had:
PasswordAuthentication = no
Now when I tried to ssh:
ssh 'server@192.168.xx.x'
I was getting the error:
Permission denied (publickey)
How can I solve the problem?
I have changed the authorized_keys permission, the .ssh/ permission and so on, but the problem persist. I have even used the ssh-agent $SHELL && ssh-add command.
ssh
What are the current permissions on the.sshdirectory and the files therein on theserversystem?
â Kusalananda
Sep 19 at 7:29
authorized_keysin remote host must be 644
â Archemar
Sep 19 at 7:40
1
usingssh -vvvwill give more verbose output - but is the .pub key in the your authorized_keys file on the server you want to access?
â fcbsd
Sep 19 at 9:18
How do you pass your private key? Using ssh-agent or ssh -i ?
â Panki
Sep 19 at 9:51
@Panki They say they start a shell through the agent and then add the key withssh-add.
â Kusalananda
Sep 19 at 9:56
 |Â
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to login into remote server without password using ssh but I am get the error:
Permission denied (publickey)
To copy .pub key to the server, I had:
PasswordAuthentication = yes (in the sshd_config file).
After I copied the .pub key, the i disabled the password in the ssh_config I had:
PasswordAuthentication = no
Now when I tried to ssh:
ssh 'server@192.168.xx.x'
I was getting the error:
Permission denied (publickey)
How can I solve the problem?
I have changed the authorized_keys permission, the .ssh/ permission and so on, but the problem persist. I have even used the ssh-agent $SHELL && ssh-add command.
ssh
I am trying to login into remote server without password using ssh but I am get the error:
Permission denied (publickey)
To copy .pub key to the server, I had:
PasswordAuthentication = yes (in the sshd_config file).
After I copied the .pub key, the i disabled the password in the ssh_config I had:
PasswordAuthentication = no
Now when I tried to ssh:
ssh 'server@192.168.xx.x'
I was getting the error:
Permission denied (publickey)
How can I solve the problem?
I have changed the authorized_keys permission, the .ssh/ permission and so on, but the problem persist. I have even used the ssh-agent $SHELL && ssh-add command.
ssh
ssh
edited Sep 19 at 9:05
Goro
5,96652762
5,96652762
asked Sep 19 at 7:25
Taddey
1
1
What are the current permissions on the.sshdirectory and the files therein on theserversystem?
â Kusalananda
Sep 19 at 7:29
authorized_keysin remote host must be 644
â Archemar
Sep 19 at 7:40
1
usingssh -vvvwill give more verbose output - but is the .pub key in the your authorized_keys file on the server you want to access?
â fcbsd
Sep 19 at 9:18
How do you pass your private key? Using ssh-agent or ssh -i ?
â Panki
Sep 19 at 9:51
@Panki They say they start a shell through the agent and then add the key withssh-add.
â Kusalananda
Sep 19 at 9:56
 |Â
show 1 more comment
What are the current permissions on the.sshdirectory and the files therein on theserversystem?
â Kusalananda
Sep 19 at 7:29
authorized_keysin remote host must be 644
â Archemar
Sep 19 at 7:40
1
usingssh -vvvwill give more verbose output - but is the .pub key in the your authorized_keys file on the server you want to access?
â fcbsd
Sep 19 at 9:18
How do you pass your private key? Using ssh-agent or ssh -i ?
â Panki
Sep 19 at 9:51
@Panki They say they start a shell through the agent and then add the key withssh-add.
â Kusalananda
Sep 19 at 9:56
What are the current permissions on the
.ssh directory and the files therein on the server system?â Kusalananda
Sep 19 at 7:29
What are the current permissions on the
.ssh directory and the files therein on the server system?â Kusalananda
Sep 19 at 7:29
authorized_keys in remote host must be 644â Archemar
Sep 19 at 7:40
authorized_keys in remote host must be 644â Archemar
Sep 19 at 7:40
1
1
using
ssh -vvv will give more verbose output - but is the .pub key in the your authorized_keys file on the server you want to access?â fcbsd
Sep 19 at 9:18
using
ssh -vvv will give more verbose output - but is the .pub key in the your authorized_keys file on the server you want to access?â fcbsd
Sep 19 at 9:18
How do you pass your private key? Using ssh-agent or ssh -i ?
â Panki
Sep 19 at 9:51
How do you pass your private key? Using ssh-agent or ssh -i ?
â Panki
Sep 19 at 9:51
@Panki They say they start a shell through the agent and then add the key with
ssh-add.â Kusalananda
Sep 19 at 9:56
@Panki They say they start a shell through the agent and then add the key with
ssh-add.â Kusalananda
Sep 19 at 9:56
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
0
down vote
I always use below step to create new ssh connection to remote machines:
Generate a new
sshkey pair (just press enter until back to shell):localhost$ ssh-keygen -t rsa
localhost$ cp .ssh/id_rsa.pub .ssh/authorized_keysCopying the newly created public key to remote machine:
localhost$ ssh-copy-id username@myIP
username@myIP password:Now try to login (there will be no password prompt):
ssh username@myIP
Notes: I never edit
ssh_configandsshd_configso maybe you can
restore them back to the original state unless they already connected.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I always use below step to create new ssh connection to remote machines:
Generate a new
sshkey pair (just press enter until back to shell):localhost$ ssh-keygen -t rsa
localhost$ cp .ssh/id_rsa.pub .ssh/authorized_keysCopying the newly created public key to remote machine:
localhost$ ssh-copy-id username@myIP
username@myIP password:Now try to login (there will be no password prompt):
ssh username@myIP
Notes: I never edit
ssh_configandsshd_configso maybe you can
restore them back to the original state unless they already connected.
add a comment |Â
up vote
0
down vote
I always use below step to create new ssh connection to remote machines:
Generate a new
sshkey pair (just press enter until back to shell):localhost$ ssh-keygen -t rsa
localhost$ cp .ssh/id_rsa.pub .ssh/authorized_keysCopying the newly created public key to remote machine:
localhost$ ssh-copy-id username@myIP
username@myIP password:Now try to login (there will be no password prompt):
ssh username@myIP
Notes: I never edit
ssh_configandsshd_configso maybe you can
restore them back to the original state unless they already connected.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I always use below step to create new ssh connection to remote machines:
Generate a new
sshkey pair (just press enter until back to shell):localhost$ ssh-keygen -t rsa
localhost$ cp .ssh/id_rsa.pub .ssh/authorized_keysCopying the newly created public key to remote machine:
localhost$ ssh-copy-id username@myIP
username@myIP password:Now try to login (there will be no password prompt):
ssh username@myIP
Notes: I never edit
ssh_configandsshd_configso maybe you can
restore them back to the original state unless they already connected.
I always use below step to create new ssh connection to remote machines:
Generate a new
sshkey pair (just press enter until back to shell):localhost$ ssh-keygen -t rsa
localhost$ cp .ssh/id_rsa.pub .ssh/authorized_keysCopying the newly created public key to remote machine:
localhost$ ssh-copy-id username@myIP
username@myIP password:Now try to login (there will be no password prompt):
ssh username@myIP
Notes: I never edit
ssh_configandsshd_configso maybe you can
restore them back to the original state unless they already connected.
answered Sep 19 at 13:50
affan
274
274
add a comment |Â
add a comment |Â
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%2f469948%2fhow-to-solve-problem-with-ssh-authentication%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 are the current permissions on the
.sshdirectory and the files therein on theserversystem?â Kusalananda
Sep 19 at 7:29
authorized_keysin remote host must be 644â Archemar
Sep 19 at 7:40
1
using
ssh -vvvwill give more verbose output - but is the .pub key in the your authorized_keys file on the server you want to access?â fcbsd
Sep 19 at 9:18
How do you pass your private key? Using ssh-agent or ssh -i ?
â Panki
Sep 19 at 9:51
@Panki They say they start a shell through the agent and then add the key with
ssh-add.â Kusalananda
Sep 19 at 9:56