I have a VM that has the fixed snapshot, and I have not the right to install anything How I can achieve the goal?
Passing password to ssh connection Windows 10, using git bash without needing to install anything and without needing to input a password.
There might be actions that are done just once, but there can not be an action that is executed upon each double click of the script file. If I need to do anything except double-clicking (entering passing or adding a computer to trusted sources, fingerprint, executing ssh-agent, and so on).
Beautiful, simple , ubiquitous solution:
Here I will post what I have done so far, and what is not suitable.
Tried solution 1:
ssh-keygen ssh-copy-id email@example.com ssh firstname.lastname@example.org
Does not suit as it requires password but this time for key
Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/user/.ssh/id_rsa):
Tried solution 1.1
If I make something like this:
eval `ssh-agent` # Add the identity (private key) to the agent ssh-add /c/users/user/.ssh/id_rsa ssh email@example.com
the result is also not suitable:
Agent pid 2262 Enter passphrase for /c/users/user/.ssh/id_rsa:
Troubleshooting have been done:
The server might not be configured to accept public key authentication. Make sure /etc/ssh/sshd_config on the server contains PubkeyAuthentication yes. Remember to restart the sshd process on the server.
If trying to login as root, the server might not be configured to allow root logins. Make sure /etc/sshd_config includes PermitRootLogin yes, PermitRootLogin prohibit-password, or without-password. If it is set to forced-commands-only, the key must be manually configured to use a forced command (see command= option in ~/.ssh/authorized_keys.
Make sure the client allows public key authentication. Check that /etc/ssh/config includes PubkeyAuthentication yes.
Tried solution 2
If I make an empty password it still ask for password
The goal is to pass my password the server without prompting.
What is the solution:
Actions that must be done once.
1.Create ssh key with ssh-keygen
1.1 input empty password and confirmation for ssh-keygen
- then create user@host : password association with ssh-copy-id command
2.1 First, it will ask to add fingerprint of the server, write down "yes". It is done just once, to make sure that this host is trusted or rather regularly visited and within the list of known_hosts file.
2.2 It will ask password of the "firstname.lastname@example.org". Please, do not confuse this password with the ssh-keygen generated password(which is empty) - they are different entities.
So this time just write the password for your remote host "email@example.com"
Once you have done those steps, you may simply issue the following command to
and you are done, so you may simply start your server.sh file with a single line in it. This works for windows 10 + git bash
P.S. After restarting it works as expected when I start my server.sh file with a single line, it directly logs in without prompting password.