Answer the question
In order to leave comments, you need to log in
How to connect to a remote server if the username and SSH key are available as a string (apparently incomplete)?
It is necessary to connect to a remote server via SSH
The customer provided a username and not entirely clear SSH keys in the form of a regular string
-----------------
user: ssh_user
keys:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA366rtRt56Tgfh9joY7FtkUC/rXU/yMJR+kGMFT4u8riYhG5KzqGYB+pWl5X+JUsKEkR2dfkaEMSscf1fZz2AvJZoQVUyMkv6Cv31ay4dN4vBm366rtRt56Tgfh9joniIkOntdAnVPJ6UP7Hs3wmtiwhIJLRSZdTkyHMv1nkJlQEBRJrwXL8VMc+366rtRt56Tgfh9joRoC366rtRt56Tgfh9joZvdoIHRfRlLN366rtRt56Tgfh9jovuCY7XQo1zAtWkOc9Zie1KXfelDBVFB2S/sokdLCjz8t6fzePhYC5D6Ln/24366rtRt56Tgfh9jojGpGHwcOBZ9BzfmIA0Wnm++xG8366rtRt56Tgfh9joFBK0teFiev7V+ipw==
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA1B+jA366rtRt56Tgfh9joY2/pSVhnx2+1+mr6EyecRhf1ksh2W69Lhrc57eLwELQbbgmXePWf3yrwOz/1HhbG366rtRt56Tgfh9joV3rE54M0wYlWuUar5GYCujwjRhaZYacPWGaBY0GyP3x5+C6dn10Marh3A7yJw0Anh1Zsi0bHqV4YQkPKAaO4iVWrS0wrtYRTYretyRE366rtRt56Tgfh9joFGHTrbHhy05IfR7xd92X366rtRt56Tgfh9jo+9wMkNqJZ366rtRt56Tgfh9joWNR3bk4uHjpL+2zCR62p+366rtRt56Tgfh9jo+6ulJzKCB072Pr9+m2YrLKS366rtRt56Tgfh9joNdtW3+lhThgvM5V+enc5Q==
Answer the question
In order to leave comments, you need to log in
These are the public parts of the keys, which are located in a file ~/.ssh/authorized_keys
on the server, and the ~/.ssh/
private parts of the keys should be in the local directory. It should be the other way around: you provide your public key, and the server owner adds it to authorized_keys , and after that it will be possible to access the server via SSH. So generate a key and send the public part to the client - and nothing else. The private part of the key must not leave the PC on which it is used. When sending a private part of the key over an unencrypted channel on the Internet, this part is considered compromised and this key must be destroyed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question