Differences
This shows you the differences between the selected revisions of the page.
ssh_verifying_the_host_key 2014-11-30 | ssh_verifying_the_host_key 2024-09-03 (current) | ||
Line 5: | Line 5: | ||
This is a feature of the SSH protocol. It is designed to protect you against a network attack known as spoofing: secretly redirecting your connection to a different computer, so that you send your password to the wrong machine. Using this technique, an attacker would be able to learn the password that guards your login account, and could then log in as if they were you and use the account for their own purposes. | This is a feature of the SSH protocol. It is designed to protect you against a network attack known as spoofing: secretly redirecting your connection to a different computer, so that you send your password to the wrong machine. Using this technique, an attacker would be able to learn the password that guards your login account, and could then log in as if they were you and use the account for their own purposes. | ||
+ | |||
+ | ~~AD~~ | ||
To prevent this attack, each server has a unique identifying code, called a host key. These keys prevent a server from forging another server's key. If you connect to a server and you receive an unexpected host key, WinSCP can warn you that the server may have been switched and that a spoofing attack might be underway. | To prevent this attack, each server has a unique identifying code, called a host key. These keys prevent a server from forging another server's key. If you connect to a server and you receive an unexpected host key, WinSCP can warn you that the server may have been switched and that a spoofing attack might be underway. | ||
Line 12: | Line 14: | ||
However, when you connect to a server for the first time, WinSCP has no way of telling whether the host key is the right one or not. So it gives the warning shown above, and asks you whether you want to trust this host key or not. | However, when you connect to a server for the first time, WinSCP has no way of telling whether the host key is the right one or not. So it gives the warning shown above, and asks you whether you want to trust this host key or not. | ||
- | Whether or not to trust the host key is your choice. If you are connecting within a company network, you might feel that all the network users are on the same side and spoofing attacks are unlikely, so you might choose to trust the key without checking it. If you are connecting across a hostile network (such as the Internet), you should check with your system administrator, perhaps by telephone or in person. (Some modern servers have more than one host key. If the system administrator sends you more than one fingerprint, you should make sure the one WinSCP shows you is on the list, but it doesn't matter which one it is.) ((&puttydoccite)) | + | Whether or not to trust the host key is your choice. If you are connecting within a company network, you might feel that all the network users are on the same side and spoofing attacks are unlikely, so you might choose to trust the key without checking it. If you are connecting across a hostile network (such as the Internet), you should check with your system administrator, perhaps by telephone or in person. (When verifying the fingerprint, be careful with letters and numbers that can be confused with each other: ''0''/''O'', ''1''/''I''/''l'', and so on.) |
+ | |||
+ | Many servers have more than one host key. If the system administrator sends you more than one fingerprint, you should make sure the one WinSCP shows you is on the list, but it doesn't matter which one it is.((&puttydoccite)) See, what are other ways to [[faq_hostkey|obtaining host key fingerprint]]. | ||
[[administration|System administrator can restrict]] connection to server without having their host keys accepted in advance. | [[administration|System administrator can restrict]] connection to server without having their host keys accepted in advance. | ||
Line 22: | Line 26: | ||
Once the key is verified, you can see it during all future sessions on [[ui_fsinfo|Server and Protocol Information Dialog]]. | Once the key is verified, you can see it during all future sessions on [[ui_fsinfo|Server and Protocol Information Dialog]]. | ||
- | ===== Automating Host Key Verification ===== | + | ~~AD~~ |
+ | |||
+ | ===== [[automation]] Automating Host Key Verification ===== | ||
Learn how to [[scripting#hostkey|accept host key automatically in script]]. | Learn how to [[scripting#hostkey|accept host key automatically in script]]. | ||
- | In .NET assembly, use ''[[library_sessionoptions|SessionOptions.SshHostKeyFingerprint]]''. | + | In .NET assembly, use ''[[library_sessionoptions#sshhostkeyfingerprint|SessionOptions.SshHostKeyFingerprint]]''. You can use the ''[[library_session_scanfingerprint|Session.ScanFingerprint]]'' method to retrieve the server's host key fingerprint to allow a user to manually verify the key, before you assign the fingerprint to the ''SessionOptions.SshHostKeyFingerprint''. |
~~NOTOC~~ | ~~NOTOC~~ |