How to install public key in host windows server 2012 The 2019 Stack Overflow Developer Survey Results Are In Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraFreeSSHd + WinSCP: “Server refused public-key signature despite accepting key!”How to Use SSH With a Given Public KeyCan I change the filename of my ssh public/private key pair?Install public key via ssh-copy-id for other usersWhat is the public key file that is generated by PuTTY?Where do i need to put my public rsa key on the server to allow passwordless ssh authentication?WinSCP and PuTTY SSH (SFTP) authentication to Windows OpenSSH server won't work using public keysCannot ssh into server: Permission Denied (Public Key)SSH Server refused public-key signature despite accepting keyLogging Into Windows 10 OpenSSH Server With Public Key
Presidential Pardon
Working through the single responsibility principle (SRP) in Python when calls are expensive
Does Parliament hold absolute power in the UK?
What happens to a Warlock's expended Spell Slots when they gain a Level?
Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?
Using dividends to reduce short term capital gains?
Do working physicists consider Newtonian mechanics to be "falsified"?
Drawing vertical/oblique lines in Metrical tree (tikz-qtree, tipa)
How did passengers keep warm on sail ships?
University's motivation for having tenure-track positions
What's the point in a preamp?
Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?
How to support a colleague who finds meetings extremely tiring?
Make it rain characters
Does Parliament need to approve the new Brexit delay to 31 October 2019?
What is the padding with red substance inside of steak packaging?
Variable with quotation marks "$()"
"is" operation returns false even though two objects have same id
Is 'stolen' appropriate word?
How do you keep chess fun when your opponent constantly beats you?
Loose spokes after only a few rides
How do I design a circuit to convert a 100 mV and 50 Hz sine wave to a square wave?
how can a perfect fourth interval be considered either consonant or dissonant?
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
How to install public key in host windows server 2012
The 2019 Stack Overflow Developer Survey Results Are In
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraFreeSSHd + WinSCP: “Server refused public-key signature despite accepting key!”How to Use SSH With a Given Public KeyCan I change the filename of my ssh public/private key pair?Install public key via ssh-copy-id for other usersWhat is the public key file that is generated by PuTTY?Where do i need to put my public rsa key on the server to allow passwordless ssh authentication?WinSCP and PuTTY SSH (SFTP) authentication to Windows OpenSSH server won't work using public keysCannot ssh into server: Permission Denied (Public Key)SSH Server refused public-key signature despite accepting keyLogging Into Windows 10 OpenSSH Server With Public Key
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
My user from another server gave his public key to me and asked me to install this public key into my server so he can connect to my server. Did some research and I have to create a directory called .ssh
and paste my user public key in a Notepad and save this text file into the .ssh
directory. My question is does my research correct if so where and how I create this .ssh
directory and the key file, is it in text file format? Do I have to pass any information like my key to the user? I’m using Windows Server 2012.
ssh windows-server-2012 openssh sftp
New contributor
add a comment |
My user from another server gave his public key to me and asked me to install this public key into my server so he can connect to my server. Did some research and I have to create a directory called .ssh
and paste my user public key in a Notepad and save this text file into the .ssh
directory. My question is does my research correct if so where and how I create this .ssh
directory and the key file, is it in text file format? Do I have to pass any information like my key to the user? I’m using Windows Server 2012.
ssh windows-server-2012 openssh sftp
New contributor
Comments are not for extended discussion; this conversation has been moved to chat.
– DavidPostill♦
10 hours ago
add a comment |
My user from another server gave his public key to me and asked me to install this public key into my server so he can connect to my server. Did some research and I have to create a directory called .ssh
and paste my user public key in a Notepad and save this text file into the .ssh
directory. My question is does my research correct if so where and how I create this .ssh
directory and the key file, is it in text file format? Do I have to pass any information like my key to the user? I’m using Windows Server 2012.
ssh windows-server-2012 openssh sftp
New contributor
My user from another server gave his public key to me and asked me to install this public key into my server so he can connect to my server. Did some research and I have to create a directory called .ssh
and paste my user public key in a Notepad and save this text file into the .ssh
directory. My question is does my research correct if so where and how I create this .ssh
directory and the key file, is it in text file format? Do I have to pass any information like my key to the user? I’m using Windows Server 2012.
ssh windows-server-2012 openssh sftp
ssh windows-server-2012 openssh sftp
New contributor
New contributor
edited yesterday
xChaax
New contributor
asked Apr 10 at 5:25
xChaaxxChaax
163
163
New contributor
New contributor
Comments are not for extended discussion; this conversation has been moved to chat.
– DavidPostill♦
10 hours ago
add a comment |
Comments are not for extended discussion; this conversation has been moved to chat.
– DavidPostill♦
10 hours ago
Comments are not for extended discussion; this conversation has been moved to chat.
– DavidPostill♦
10 hours ago
Comments are not for extended discussion; this conversation has been moved to chat.
– DavidPostill♦
10 hours ago
add a comment |
1 Answer
1
active
oldest
votes
- The public key must go into
authorized_keys
file (not just to some text file) in the.ssh
subfolder of user's home directory. The public key entry must have a correct format like:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAir2cIHsAFg8QzLF6Yb... some optional comment
The
authorized_keys
file must use *nix line endings, what Notepad cannot do (so make sure your SFTP/FTP client uses ASCII transfer mode to convert the line endings)- The
.ssh
folder needs to have700
permissions and theauthorized_keys
needs to have600
permissions.
There are zillions of guides on the Internet that cover the above.
For example see my guide to Setting up SSH public key authentication in OpenSSH.
If the user is already a user on your server (has password [or other] authentication working), he/she can setup the public key on his/her own.
- On *nix machines (or others that have OpenSSH available, what may include Windows), you can use
ssh-copy-id
script. - On Windows machines, you can use (my) WinSCP, with its Install Public Key into Server function.
See also my answer to Setting up public key authentication to Linux server from Windows (ppk private key).
You should provide your user a copy of the server's public host key, so that the user can verify it, when connecting for the first time (it's a separate from the authentication, what the rest of the question is about). Though many users just blindly accept the host key.
Does it matter what directory for .ssh folder ? If does, what directory is home directory? And what is the format for authorized_keys file ?
– xChaax
2 days ago
See my updated answer.
– Martin Prikryl
2 days ago
5
More generally, the public key must go in whatever file is specified asAuthorizedKeysFile
insshd_config
, which by default is~/.ssh/authorized_keys
– user4556274
2 days ago
It's a bit of a sloppy hack, but on new machines I generally run a 'ssh-keygen' to create the~/.ssh/
directory in the proper place with the proper permissions, and then copy keys into the authorized_keys file.
– Dave X
2 days ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "3"
;
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
xChaax is a new contributor. Be nice, and check out our Code of Conduct.
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1423613%2fhow-to-install-public-key-in-host-windows-server-2012%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
- The public key must go into
authorized_keys
file (not just to some text file) in the.ssh
subfolder of user's home directory. The public key entry must have a correct format like:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAir2cIHsAFg8QzLF6Yb... some optional comment
The
authorized_keys
file must use *nix line endings, what Notepad cannot do (so make sure your SFTP/FTP client uses ASCII transfer mode to convert the line endings)- The
.ssh
folder needs to have700
permissions and theauthorized_keys
needs to have600
permissions.
There are zillions of guides on the Internet that cover the above.
For example see my guide to Setting up SSH public key authentication in OpenSSH.
If the user is already a user on your server (has password [or other] authentication working), he/she can setup the public key on his/her own.
- On *nix machines (or others that have OpenSSH available, what may include Windows), you can use
ssh-copy-id
script. - On Windows machines, you can use (my) WinSCP, with its Install Public Key into Server function.
See also my answer to Setting up public key authentication to Linux server from Windows (ppk private key).
You should provide your user a copy of the server's public host key, so that the user can verify it, when connecting for the first time (it's a separate from the authentication, what the rest of the question is about). Though many users just blindly accept the host key.
Does it matter what directory for .ssh folder ? If does, what directory is home directory? And what is the format for authorized_keys file ?
– xChaax
2 days ago
See my updated answer.
– Martin Prikryl
2 days ago
5
More generally, the public key must go in whatever file is specified asAuthorizedKeysFile
insshd_config
, which by default is~/.ssh/authorized_keys
– user4556274
2 days ago
It's a bit of a sloppy hack, but on new machines I generally run a 'ssh-keygen' to create the~/.ssh/
directory in the proper place with the proper permissions, and then copy keys into the authorized_keys file.
– Dave X
2 days ago
add a comment |
- The public key must go into
authorized_keys
file (not just to some text file) in the.ssh
subfolder of user's home directory. The public key entry must have a correct format like:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAir2cIHsAFg8QzLF6Yb... some optional comment
The
authorized_keys
file must use *nix line endings, what Notepad cannot do (so make sure your SFTP/FTP client uses ASCII transfer mode to convert the line endings)- The
.ssh
folder needs to have700
permissions and theauthorized_keys
needs to have600
permissions.
There are zillions of guides on the Internet that cover the above.
For example see my guide to Setting up SSH public key authentication in OpenSSH.
If the user is already a user on your server (has password [or other] authentication working), he/she can setup the public key on his/her own.
- On *nix machines (or others that have OpenSSH available, what may include Windows), you can use
ssh-copy-id
script. - On Windows machines, you can use (my) WinSCP, with its Install Public Key into Server function.
See also my answer to Setting up public key authentication to Linux server from Windows (ppk private key).
You should provide your user a copy of the server's public host key, so that the user can verify it, when connecting for the first time (it's a separate from the authentication, what the rest of the question is about). Though many users just blindly accept the host key.
Does it matter what directory for .ssh folder ? If does, what directory is home directory? And what is the format for authorized_keys file ?
– xChaax
2 days ago
See my updated answer.
– Martin Prikryl
2 days ago
5
More generally, the public key must go in whatever file is specified asAuthorizedKeysFile
insshd_config
, which by default is~/.ssh/authorized_keys
– user4556274
2 days ago
It's a bit of a sloppy hack, but on new machines I generally run a 'ssh-keygen' to create the~/.ssh/
directory in the proper place with the proper permissions, and then copy keys into the authorized_keys file.
– Dave X
2 days ago
add a comment |
- The public key must go into
authorized_keys
file (not just to some text file) in the.ssh
subfolder of user's home directory. The public key entry must have a correct format like:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAir2cIHsAFg8QzLF6Yb... some optional comment
The
authorized_keys
file must use *nix line endings, what Notepad cannot do (so make sure your SFTP/FTP client uses ASCII transfer mode to convert the line endings)- The
.ssh
folder needs to have700
permissions and theauthorized_keys
needs to have600
permissions.
There are zillions of guides on the Internet that cover the above.
For example see my guide to Setting up SSH public key authentication in OpenSSH.
If the user is already a user on your server (has password [or other] authentication working), he/she can setup the public key on his/her own.
- On *nix machines (or others that have OpenSSH available, what may include Windows), you can use
ssh-copy-id
script. - On Windows machines, you can use (my) WinSCP, with its Install Public Key into Server function.
See also my answer to Setting up public key authentication to Linux server from Windows (ppk private key).
You should provide your user a copy of the server's public host key, so that the user can verify it, when connecting for the first time (it's a separate from the authentication, what the rest of the question is about). Though many users just blindly accept the host key.
- The public key must go into
authorized_keys
file (not just to some text file) in the.ssh
subfolder of user's home directory. The public key entry must have a correct format like:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAir2cIHsAFg8QzLF6Yb... some optional comment
The
authorized_keys
file must use *nix line endings, what Notepad cannot do (so make sure your SFTP/FTP client uses ASCII transfer mode to convert the line endings)- The
.ssh
folder needs to have700
permissions and theauthorized_keys
needs to have600
permissions.
There are zillions of guides on the Internet that cover the above.
For example see my guide to Setting up SSH public key authentication in OpenSSH.
If the user is already a user on your server (has password [or other] authentication working), he/she can setup the public key on his/her own.
- On *nix machines (or others that have OpenSSH available, what may include Windows), you can use
ssh-copy-id
script. - On Windows machines, you can use (my) WinSCP, with its Install Public Key into Server function.
See also my answer to Setting up public key authentication to Linux server from Windows (ppk private key).
You should provide your user a copy of the server's public host key, so that the user can verify it, when connecting for the first time (it's a separate from the authentication, what the rest of the question is about). Though many users just blindly accept the host key.
edited 2 days ago
answered 2 days ago
Martin PrikrylMartin Prikryl
11.4k43381
11.4k43381
Does it matter what directory for .ssh folder ? If does, what directory is home directory? And what is the format for authorized_keys file ?
– xChaax
2 days ago
See my updated answer.
– Martin Prikryl
2 days ago
5
More generally, the public key must go in whatever file is specified asAuthorizedKeysFile
insshd_config
, which by default is~/.ssh/authorized_keys
– user4556274
2 days ago
It's a bit of a sloppy hack, but on new machines I generally run a 'ssh-keygen' to create the~/.ssh/
directory in the proper place with the proper permissions, and then copy keys into the authorized_keys file.
– Dave X
2 days ago
add a comment |
Does it matter what directory for .ssh folder ? If does, what directory is home directory? And what is the format for authorized_keys file ?
– xChaax
2 days ago
See my updated answer.
– Martin Prikryl
2 days ago
5
More generally, the public key must go in whatever file is specified asAuthorizedKeysFile
insshd_config
, which by default is~/.ssh/authorized_keys
– user4556274
2 days ago
It's a bit of a sloppy hack, but on new machines I generally run a 'ssh-keygen' to create the~/.ssh/
directory in the proper place with the proper permissions, and then copy keys into the authorized_keys file.
– Dave X
2 days ago
Does it matter what directory for .ssh folder ? If does, what directory is home directory? And what is the format for authorized_keys file ?
– xChaax
2 days ago
Does it matter what directory for .ssh folder ? If does, what directory is home directory? And what is the format for authorized_keys file ?
– xChaax
2 days ago
See my updated answer.
– Martin Prikryl
2 days ago
See my updated answer.
– Martin Prikryl
2 days ago
5
5
More generally, the public key must go in whatever file is specified as
AuthorizedKeysFile
in sshd_config
, which by default is ~/.ssh/authorized_keys
– user4556274
2 days ago
More generally, the public key must go in whatever file is specified as
AuthorizedKeysFile
in sshd_config
, which by default is ~/.ssh/authorized_keys
– user4556274
2 days ago
It's a bit of a sloppy hack, but on new machines I generally run a 'ssh-keygen' to create the
~/.ssh/
directory in the proper place with the proper permissions, and then copy keys into the authorized_keys file.– Dave X
2 days ago
It's a bit of a sloppy hack, but on new machines I generally run a 'ssh-keygen' to create the
~/.ssh/
directory in the proper place with the proper permissions, and then copy keys into the authorized_keys file.– Dave X
2 days ago
add a comment |
xChaax is a new contributor. Be nice, and check out our Code of Conduct.
xChaax is a new contributor. Be nice, and check out our Code of Conduct.
xChaax is a new contributor. Be nice, and check out our Code of Conduct.
xChaax is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1423613%2fhow-to-install-public-key-in-host-windows-server-2012%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Comments are not for extended discussion; this conversation has been moved to chat.
– DavidPostill♦
10 hours ago