Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 just started moving to using RSA keys for my ssh authentications instead of passwords. I have one cloud based server, one local server and two vm servers on my local. I log into them from 3 different clients (laptop, work computer and my phone).
I want to make sure I have all the right keys in the right places so I can disable password logins all together. I started making keys and testing and copied them to back them up but I was stupid and didn't label them in a way that I know which pair goes with which server.
Can I just recreate the keys and copy the new key to my servers and over write the existing keys? Or if not is it ok to have multiple public keys on the servers?
I'm trying to set this all up without locking myself out (especially on the cloud where I can't get in front of the machine)
I make directories under .ssh and stick all my client keyfiles there in a directory for each, one per client.
I make heavy use of aliases that do all the typing for me.
Code:
alias grid1='ssh -i /home/jj/.ssh/c9/c9grids [email]user@ipa.ddr.ess'
I know this all can be simplified in an ~/.ssh/config file, I just haven't taken the time to do so.
Quote:
Originally Posted by Ryanms3030
Can I just recreate the keys and copy the new key to my servers and over write the existing keys? Or if not is it ok to have multiple public keys on the servers?
naw, you can just copy the contents of your main key.pub (or the one you just made) to any server you want to access. Or... copy the contents of say, /root/authorzed_keys (or keys2) to any server you wish access to.
in my ~/.bashrc
each of those .hosts file has the client's hosts' aliases in them, eg:
Code:
cat /home/jj/.ssh/c9/lavoult.hosts
alias lvlb01="ssh -i /home/jj/.ssh/LaVoult/matt_root_c9 root@123.456.xxx.xxx"
alias lvgtwy01="ssh -i /home/jj/.ssh/LaVoult/matt_root_c9 root@123.456.xxx.xxx"
alias lvweb01="ssh -i /home/jj/.ssh/LaVoult/matt_root_c9 root@123.456.xxx.xxx"
alias lvdb01="ssh -i /home/jj/.ssh/LaVoult/matt_root_c9 root@123.456.xxx.xxx"
alias lvweb01a="ssh -i /home/jj/.ssh/LaVoult/matt_root_c9 root@123.456.xxx.xxx"
One of the benefits I found for this method is I don't have to go digging if I need to change one host entry, I know it's in a .hosts file on my system. A simple edit and reload .bashrc and I'm good.
So I have this figured out from Linux client but I am also trying to set it up from a Win client with Putty. I have followed a couple of different tutorials such as this (they all had the same basic steps)
Disregard my last post , I was being stupid. I forgot to the host name in the Putty session screen. I thought I had it saved to a session but guess not. I have it all working now. Thanks
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.