Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have Linux box and it's host another Linux in VMware and yet another one in QEMU
I want to be able to login from both VMWare and QEMU to host computer without being asked password.
So I took usual route - generated private/public key with keygen (rsa keys),
put private key in the Linux on VMWare, (~/.ssh/id_rsa) public key in the host (~/.ssh/authorized_keys) and was able to login without password to host computer.
Now I copied ~/.ssh/id_rsa from VMWare into the Linux in QEMU, run ssh - and ooops - I prompted to enter password.
Also I copied ~/.ssh/id_rsa to the host computer and tried to ssh to myself (both as to real ip and to 127.0.0.1) - and again was prompted to enter password.
Any ideas how can I ssh from QEMU to host computer without password ?
In the second VM you copied the id_rsa private key instead of the id_rsa.pub public key to the server's authorized_keys file. You need to append both public keys to the host's authorized_keys file. Other things that can prevent authentication include the permissions of your keys, the .ssh directory and the /home directory.
If you use ssh to connect to a remote client, having a passphrase protected key is a good idea. You can use `ssh-agent' & `ssh-add' to store your passphrase for the session. After that you won't be prompted for the password.
If the VMs and host are isolated in their own virtual subnet, then you don't really need the security of ssh AFAIK.
In the second VM you copied the id_rsa private key instead of the id_rsa.pub public key to the server's authorized_keys file. You need to append both public keys to the host's authorized_keys file. Other things that can prevent authentication include the permissions of your keys, the .ssh directory and the /home directory.
If you use ssh to connect to a remote client, having a passphrase protected key is a good idea. You can use `ssh-agent' & `ssh-add' to store your passphrase for the session. After that you won't be prompted for the password.
If the VMs and host are isolated in their own virtual subnet, then you don't really need the security of ssh AFAIK.
No, permissions are OK and I copied correct file to authorized_keys.
But now I half-solved the problem. I was able to login without password when I use DSA key. Interesting enough, that in QEMU (Debian 4.0, ARM) I was able log to with both DSA and RSA key. But in my Fedora8 x86_64 - only with DSA key.
RSA key doesn't work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.