View previous topic :: View next topic |
Author |
Message |
lkraemer Member
Joined: 25 Jun 2010 Posts: 37
|
Posted: Thu May 12, 2011 11:13 pm Post subject: SSH Keys and moving to user access computer |
|
|
I have the files for the SSH keys that SMS generated when it initially
booted up on my USB Flash Drive.
Where do I copy these files on my laptop so I can ssh into my sms server
and have access? I've been searching on the internet and typically the key
is generated by the user and placed on the server. so, this is a bit
foreign to me.
Thanks.
Larry
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Fri May 13, 2011 5:45 am Post subject: |
|
|
You can always ssh to your machine with password, if you want to automatically login with no password using your ssh key, run
and type a password or press enter
it will create
Code: | ~/.ssh/id_rsa
~/.ssh/id_rsa.pub |
Copy your public key and assign permissions
Code: | cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys |
Move your ssh keys to client and place them at
~/.ssh folder, or use like
Code: | ssh -i id-rsa.pub root@yourserver |
the first time you will login it will ask you to accept the certificate just type "yes"
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
lkraemer Member
Joined: 25 Jun 2010 Posts: 37
|
Posted: Fri May 13, 2011 3:47 pm Post subject: |
|
|
OK, I still need more clarification......
I can ssh into my SMS Server with my Server password.......but I want to
login with no password using ssh keys......and I am thinking I want to use
the ones that SMS created on Initial install & bootup. Is that reasonable?
I understand that SMS created several Private and Public keys. in fact it created 8 files that I have copied to my Linux Debian Laptop to my
/home/larry/.ssh/ subdirectory.
So, from this point how do I get those keys to be accepted when I
login to the SMS Server? I need specifics, please.....
If I need to create another set of keys, do I do it on the SMS Server,
or my Laptop? Or, does it make a difference?
Would this be the correct procedure for doing it on the SMS Server?
You can always ssh to your SMS Server from your Laptop using your SMS Servers password, or if you want to automatically login to the SMS Server with no password, and by using your ssh key, run the following on your
SMS Server:
and type a password or press enter, it will create Private & Public Keys for
rsa.
Code: |
~/.ssh/id_rsa
~/.ssh/id_rsa.pub
|
Copy your public key from the SMS Server to authorized_keys and assign permissions
Code: |
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
|
Move your ssh Public keys to the client (Laptop) and place them at
~/.ssh folder, or use something like
Code: |
ssh -i id-rsa.pub root@yourserver
|
the first time you will login it will ask you to accept the certificate just type "yes"
Should the authorized_keys file be for Version 1 or Version 2? Or should I create both?
Thanks.
Larry
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Fri May 13, 2011 6:13 pm Post subject: |
|
|
The random keys are generated, because they don't exist,
just copy your keys you created with 'ssh-keygen' in your home
/home/larry/.ssh/
and if you have already an authorized_keys, do
Code: | cat /home/larry/.ssh/id_rsa.pub >> /home/larry/.ssh/authorized_keys
chmod -R 600 /home/larry/.ssh/ |
that's it and ssh like
"ssh root@yoursmsserver"
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
lkraemer Member
Joined: 25 Jun 2010 Posts: 37
|
Posted: Sat May 14, 2011 4:53 pm Post subject: HOWTO: ssh keys |
|
|
Here is a text document of the exact procedures I used to generate my
ssh keys for my SMS Server, along with information on setting up my Laptops.
Maybe you want to edit/cleanup/modify as necessary to make a HOWTO:
to post in that section.
Hopefully it will save someone several hours of trouble.
THANKS.
Larry
Description: |
HOWTO: Install your ssh keys on the SMS Server & Laptops. |
|
![](images/icon_clip.gif) Download |
Filename: |
ssh_Settings.zip |
Filesize: |
851 Bytes |
Downloaded: |
1420 Time(s) |
|
|
Back to top |
|
|