By using the -l parameter you can define another user name. This might not always be the same user as you are running on your Windows machine. The optional -l parameter defines the user on the remote server. Last login: Fri Mar 12 16:46:09 ~ $ uname -a Warning: Permanently added '192.168.15.20' (ECDSA) to the list of known hosts. The authenticity of host '192.168.15.20 (192.168.15.20)' can't be established.ĮCDSA key fingerprint is SHA256: F4MZdFhziAjwqwgM50G8186ef2qMbgEQS Ri8ciWgo.Īre you sure you want to continue connecting (yes/no/)? yes Now that we have created a key, enabled ssh agent and placed the public key on the target server, we can initiate a ssh connection: PS C:\Users\ck> ssh -l ck 192.168.15.20 Note: ~ stands for user's home folder Connect to a remote SSH server ssh/authorized_keys on the remote server. Send this key (or the content) to the server administrator – or if you have access to the server already, place the line into the file ~/. This shows the content of the public key, which is a long line of a text: SSH public key in Notepad Open the id_rsa.pub file with a text editor. To enable and start the ssh-agent service, open another PowerShell window (run as Administrator): Stopped ssh-agent OpenSSH Authentication Agent You can check whether the service is already running or not: PS C:\Users\ck> Get-Service ssh-agent Note: Pageant is another widely used and well known ssh agent on Windows. This allows to use the ssh command without always having to enter the passphrase again. It needs to be installed on the target server(s) where you want to login using SSH.Ī SSH agent is a small program which runs in the background and loads your private key with the password into memory.
0 Comments
Leave a Reply. |