(Mostly a sysadmin things)
Run the top-most script with a remote target pointed in the first argument:
./steps-00-init [user@]hostname
Eg:
$ ./steps-00-init [email protected]
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/sskras/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
Executing /root/.bashrc
Executing /root/.bash_functions
Number of key(s) added: 1
Now try logging into the machine, with: "ssh -o 'StrictHostKeyChecking=accept-new' '[email protected]'"
and check to make sure that only the key(s) you wanted were added.
Testing key-based SSH-auth:
Thu Mar 7 12:34:44 PM EET 2024 uid=0(root) gid=0(root) groups=0(root) logged in succesfully on omn
Thu Mar 7 12:34:44 PM EET 2024 Host summary: 12:34:44 up 8 days, 12:31, 5 users, load average: 0.00, 0.00, 0.00
If it’s an indirect SSH connection (eg. overlaying another SSH session like a reverse tunnel),
you may need to have your target described in ~/.ssh/config
in advance.
Eg:
Host omn.ssh
IdentityFile ~/.ssh/id_rsa-saukrs
Port 2222
ProxyJump vps1128235
Ensure the prerequisite tools (Git, GNU Make) are installed:
curl -s https://raw.githubusercontent.com/saukrs/linux-tools/main/steps-01-bootstrap | sh
... or via shortened URLs:
-
Via Twitter
curl -L t.co/kEdmHSC4ZK | sh
-
Via inbox.LV
(unreliable, may fail when an ad gets inserted)
curl -L inx.lv/mGfz | sh