------------------------------------------------
luser@linuxbox4 [/home/luser/.ssh]
------------------------------------------------
--> ssh-keygen -t rsa -N '' -f id_rsa ; \
cp id_rsa.pub id_rsa.lnxb4 ; \
scp id_rsa.lnxb4 linuxbox:/home/luser/.ssh/ ; \
ssh linuxbox "cp /home/luser/.ssh/authorized_keys \
/home/luser/.ssh/authorized_keys-8oct2015 ; \
cat /home/luser/.ssh/id_rsa.lnxb4 >> \
/home/luser/.ssh/authorized_keys ; \
scp linuxbox:/home/luser/.ssh/id_rsa.lnxb . ; \
cp authorized_keys authorized_keys-8oct2015 ; \
cat id_rsa.lnxb >> authorized_keys ; \
ssh linuxbox w"
#################################################
(without the new line \ (all one one line)
--> ssh-keygen -t rsa -N '' -f id_rsa ; cp id_rsa.pub id_rsa.lnxb4 ; scp id_rsa.lnxb4 linuxbox:/home/luser/.ssh/ ; ssh linuxbox "cp /home/luser/.ssh/authorized_keys /home/luser/.ssh/authorized_keys-8oct2015 ; cat /home/luser/.ssh/id_rsa.lnxb4 >> /home/luser/.ssh/authorized_keys ; scp linuxbox:/home/luser/.ssh/id_rsa.lnxb . ; cp authorized_keys authorized_keys-8oct2015 ; cat id_rsa.lnxb >> authorized_keys ; ssh linuxbox w"
#################################################
username: luser (local user)
clientname: linuxbox4 (abbreviated lnxb4)
remoteclient: linuxbox (abbreviated lnxb)
setting up passwordless connection between both systems
from linuxbox4 in /home/luser/.ssh - a new system on the
network of other linuxboxes.
#################################################
# establish rsa public key:
1) ssh-keygen -t rsa -N '' -f id_rsa
#################################################
# make a copy for public sharing:
2) cp id_rsa.pub id_rsa.lnxb4
#################################################
# THIS IS WHERE ALL THE MAGIC HAPPENS:
# copy public key to main system,
# then back up authorized keys there,
# then add lnxb4 public key to authorized keys,
# then copy main system's public key back to lnxb4,
# then back up local authorized keys,
# then add main system's public key to local authorized keys
# you will need to enter luser's passwd 2 or 3 times during this process
3) scp id_rsa.lnxb4 linuxbox:/home/luser/.ssh/ ; \
ssh linuxbox "cp /home/luser/.ssh/authorized_keys \
/home/luser/.ssh/authorized_keys-8oct2015 ; \
cat /home/luser/.ssh/id_rsa.lnxb4 >> \
/home/luser/.ssh/authorized_keys ; \
scp linuxbox:/home/luser/.ssh/id_rsa.lnxb . ; \
cp authorized_keys authorized_keys-8oct2015 ; \
cat id_rsa.lnxb >> authorized_keys "
#################################################
# test connection from linuxbox4
4) ssh linuxbox
# (you should be on linuxbox)
ssh linuxbox4 w
# (you should be seeing info from linuxbox4)
exit
# (you should be back on linuxbox4
# resume normal operations, you have a bi-directional passwordless connection.
#################################################
------------------------------------------------
luser@system [/home/luser/.ssh]
------------------------------------------------
--> ssh-keygen -t rsa -N '' -f id_rsa
Generating public/private rsa key pair.
Your identification has been saved in id_rsa.
Your public key has been saved in id_rsa.pub.
The key fingerprint is:
2b:2b:dd:e7:8d:12:8b:53:02:4f:be:9e:ce:7e:c0:2f luser@system
The key's randomart image is:
+--[ RSA 2048]----+
| ... |
| +. . |
| o+ |
| .oo. |
| .So |
| oo.. |
| . +o . |
| = .+ .o |
| o.o..=E . |
+-----------------+
------------------------------------------------
luser@linuxbox4 [/home/luser/.ssh]
------------------------------------------------
--> scp id_rsa.lnxb4 linuxbox:/home/luser/.ssh/ ; \
ssh linuxbox "cp /home/luser/.ssh/authorized_keys \
/home/luser/.ssh/authorized_keys-8oct2015 ; \
cat /home/luser/.ssh/id_rsa.lnxb4 >> \
/home/luser/.ssh/authorized_keys ; \
scp linuxbox:/home/luser/.ssh/id_rsa.lnxb . ; \
cp authorized_keys authorized_keys-8oct2015 ; \
cat id_rsa.lnxb >> authorized_keys ; \
ssh linuxbox w"
------------------------------------------------
------------------------------------------------
john meister, lab manager, mstm
IT systems design and integration specialist
Linux, UNIX and lesser OSes
------------------------------------------------
note: luser = local user
------------------------------------------------
luser@linuxbox4 [/home/luser/.ssh]
------------------------------------------------
--> scp id_rsa.lnxb4 linuxbox:/home/luser/.ssh/ ; \
ssh linuxbox "cp /home/luser/.ssh/authorized_keys \
/home/luser/.ssh/authorized_keys-8oct2015 ; \
cat /home/luser/.ssh/id_rsa.lnxb4 >> \
/home/luser/.ssh/authorized_keys ; \
scp linuxbox:/home/luser/.ssh/id_rsa.lnxb . ; \
cp authorized_keys authorized_keys-8oct2015 ; \
cat id_rsa.lnxb >> authorized_keys ; \
ssh linuxbox w"
other notes:
Subject: nuking avahi, fuse and other unnecessary services
http://www.linuxquestions.org/questions/linux-networking-3/why-i-want-to-absolutely-remove-the-avahi-daemon-838983/
chkconfig avahi off
chkconfig avahi-daemon off
https://help.ubuntu.com/community/NetworkConfigurationCommandLine/Automatic
https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet
http://dynacont.net/documentation/linux/Useful_SystemD_commands/
http://bencane.com/2012/01/19/cheat-sheet-systemctl-vs-chkconfig/
https://sites.google.com/site/easylinuxtipsproject/8
http://ask.systutorials.com/1380/how-to-list-all-running-system-service-on-linux-mint-17-1
|