Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 10 years, 2 months ago. Active 8 years, 5 months ago. Viewed 10k times. Any ideas what may be causing this error? Things I have tried to fix the problem without success : Installing an earlier version of Git for Windows I've tried 1. Running Git in compatibility mode. Searched the net for others experiencing the same error in relation to Git on Windows.
What might be causing this problem? Improve this question. Bouke Ben Ben 2 2 gold badges 3 3 silver badges 9 9 bronze badges. Add a comment. Active Oldest Votes. If someone acquires your private key, they can log in as you to any SSH server you have access to. The public key is what is placed on the SSH server, and may be shared without compromising the private key. When using key authentication with an SSH server, the SSH server and client compare the public key for a user name provided against the private key.
If the server-side public key cannot be validated against the client-side private key, authentication fails. Multi-factor authentication may be implemented with key pairs by entering a passphrase when the key pair is generated see user key generation below. During authentication the user is prompted for the passphrase, which is used along with the presence of the private key on the SSH client to authenticate the user.
Public keys have specific ACL requirements that, on Windows, equate to only allowing access to administrators and System. On first use of sshd, the key pair for the host will be automatically generated. By default the sshd service is set to start manually. To start it each time the server is rebooted, run the following commands from an elevated PowerShell prompt on your server:. If no algorithm is specified, RSA is used. A strong algorithm and key length should be used, such as Ed in this example.
To generate key files using the Ed algorithm, run the following from a PowerShell or cmd prompt on your client:. At this point, you'll be prompted to use a passphrase to encrypt your private key files. This can be empty but is not recommended. The passphrase works with the key file to provide two-factor authentication. For this example, we are leaving the passphrase empty.
Remember that private key files are the equivalent of a password should be protected the same way you protect your password. The private key remains on your local system. Protect this private key. Do not share it. When you use an SSH client to connect to your Linux VM which has the public key , the remote VM tests the client to make sure it possesses the private key. If the client has the private key, it's granted access to the VM.
Depending on your organization's security policies, you can reuse a single public-private key pair to access multiple Azure VMs and services.
You do not need a separate pair of keys for each VM or service you wish to access. Your public key can be shared with anyone, but only you or your local security infrastructure should possess your private key.
Windows computers do not always have comparable SSH commands installed. Recent Windows 10 versions also include the Windows Subsystem for Linux to run and access utilities such as an SSH client natively within a Bash shell. The following sections describe two options to create an SSH key pair on Windows. Also note, when using Powershell to create a key, upload the public key as ssh. Type the following command, and answer the prompts. If an SSH key pair exists in the chosen location, those files are overwritten.
0コメント