Differences

This shows you the differences between the selected revisions of the page.

guide_public_key 2023-11-02 guide_public_key 2026-04-02 (current)
Line 18: Line 18:
==== [[configure_openssh]] OpenSSH ==== ==== [[configure_openssh]] OpenSSH ====
-You can use //Session (Tabs) > Install Public Key into Server// command on the main window, or //Tools > Install Public Key into Server// command on //[[ui_login_authentication|SSH > Authentication page]]// page on Advanced Site Settings dialog. The functionality of the command is similar to that of OpenSSH ''[[https://linux.die.net/man/1/ssh-copy-id|ssh-copy-id]]'' command.+You can use //Session (Tabs) > Install Public Key into Server// command on the main window, or //Tools > Install Public Key into Server// command on //[[ui_login_authentication|SSH > Authentication page]]// page on Advanced Site Settings dialog. The functionality of the command is similar to that of [[&man_ref(1,ssh-copy-id)|OpenSSH ''ssh-copy-id'' script]].((WinSCP also has a [[commandline#copyid|command-line equivalent]].))
Or you can configure the key manually: Or you can configure the key manually:
Line 26: Line 26:
  * Switch to the [[ui_puttygen|PuTTYgen]] window, select all of the text in the //[[ui_puttygen#authorized_keys|Public key for pasting into OpenSSH authorized_keys file]]// box, and copy it to the clipboard (''Ctrl+C''). Then, switch back to the editor and insert the data into the open file, making sure it ends up all on one line. Save the file. WinSCP can [[ui_login_authentication#private_key_tools|show you the public key]] too.   * Switch to the [[ui_puttygen|PuTTYgen]] window, select all of the text in the //[[ui_puttygen#authorized_keys|Public key for pasting into OpenSSH authorized_keys file]]// box, and copy it to the clipboard (''Ctrl+C''). Then, switch back to the editor and insert the data into the open file, making sure it ends up all on one line. Save the file. WinSCP can [[ui_login_authentication#private_key_tools|show you the public key]] too.
  * Ensure that your account home directory, your ''.ssh'' directory and file ''authorized_keys'' are not group-writable or world-writable. Recommended permissions for ''.ssh'' directory are ''700''. Recommended permissions for ''authorized_keys'' files are ''600''. Read more about [[task_properties|changing permissions]].   * Ensure that your account home directory, your ''.ssh'' directory and file ''authorized_keys'' are not group-writable or world-writable. Recommended permissions for ''.ssh'' directory are ''700''. Recommended permissions for ''authorized_keys'' files are ''600''. Read more about [[task_properties|changing permissions]].
 +
 +If you cannot log in directly with the account yet (e.g., you need to use ''sudo'' to switch to ''root''), you might not be able to use WinSCP to set up the key.((Although WinSCP can, with some limitations, [[faq_su|change user after login]], this is unlikely to work at this stage.)) In this case, set up the key using shell commands that replicate the procedure above.
==== OpenSSH on Windows ==== ==== OpenSSH on Windows ====
Line 31: Line 33:
There are some specifics when setting up the [[guide_windows_openssh_server#key_authentication|public key authentication on OpenSSH server on Windows]]. There are some specifics when setting up the [[guide_windows_openssh_server#key_authentication|public key authentication on OpenSSH server on Windows]].
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD0aDC2iaVaUt6dtkZsoXx/DtPSTNjY2SLy3EAF+cFCJqhVcja6OP1Ft3A0x/G5nCfyBTSc0QyeuDXXeHV8BTyZZyMAeQ84+5x7pWagv45Q1CruODAOkxB389AFwFddHHJGFQ5IVw/dgwZQz5x6ftinpWeqtKxMpheqW+WW+xsGel450+MKOVQsaLEYkepE5w/M/Zma9RTDITTVZMRjLdXIC7WKBpCFXDZmsWklxOS7liO4cMxaYWRFEsxa80vSPKPhoMcrHI3CTVRzS/Ow4ARhkNNYHfgyaWBsgv3RMuAxBioBnt/kEQDs+UfXwEHcUzEbhmhSbM161gyp8BQZ6cBSD93bAOQ1xSDhxwSqeAUQf8yk3dtiNral8c6gbdsZc1JdNTyfIXFPu/FSLHzPgM54iGKUlXZws1GUuC6z8LOPFsAauDuG6x5+40nBLd9he5LMCAmR1hGVxd1TNPx9qx3/9gDZNA/3qPaObs09o4o9yPskVJig9nVAz+4U2S0MFn8= santhoshkumar.p@IM-CBE-MAC-8.local+==== ssh.com ==== 
 + 
 +··* [[ui_puttygen#saving_public|Save a public key file]] from [[ui_puttygen|PuTTYgen]], and copy that into the ''.ssh2'' subdirectory of your account home directory. 
 +··* In the same subdirectory, [[task_edit|edit]] (or create) a file called ''authorization''. In this file you should put a line like ''Key mykey.pub'', with ''mykey.pub'' replaced by the name of your key file.
==== Other SSH Servers ==== ==== Other SSH Servers ====
Line 39: Line 44:
When configuring session, specify path to your private key on //[[ui_login_authentication|SSH > Authentication page]]// of Advanced Site Settings dialog. When configuring session, specify path to your private key on //[[ui_login_authentication|SSH > Authentication page]]// of Advanced Site Settings dialog.
-Alternatively, load the private key into [[ui_pageant|Pageant]].+Alternatively, load the private key into [[ui_pageant|PuTTY Pageant]] (or [[ui_pref_security#authentication|OpenSSH ssh-agent]]).
===== Public Key Authentication in Clouds ===== ===== Public Key Authentication in Clouds =====

Last modified: by 103.158.145.156