LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

non-Interactive self signed Certificate

Posted 04-05-2020 at 05:08 PM by karanis
Tags openssl

openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
-keyout www.example.com.key -out www.example.com.cert
LQ Newbie
Posted in Uncategorized
Views 187 Comments 0 karanis is offline
Old

SSH : add a host to ~/.ssh/known_hosts

Posted 04-05-2020 at 05:06 PM by karanis
Tags ssh

ssh-keyscan -t rsa -H 192.168.2.124 >> ~/.ssh/known_hosts
LQ Newbie
Posted in Uncategorized
Views 143 Comments 0 karanis is offline
Old

POWER OFF spinning disk

Posted 04-05-2020 at 05:03 PM by karanis

If you are aware and paranoid on energy saving on spinning disks (which 'as they spin, they die sooner') like me, you may need :

# udisksctl power-off -b /dev/sdX

or

# hdparm -S 1 /dev/sdb

/* for hot plugs */
edit "/etc/udev/rules.d/45-sdX-power.rules" file
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTR{queue/rotational}=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"...
LQ Newbie
Posted in Uncategorized
Views 227 Comments 0 karanis is offline
Old

SSH first time login without host cert (yes/no) confirmation

Posted 04-05-2020 at 04:30 PM by karanis

THIS IS NOT ADVICED

If you are on a closed network, let`s say 100s of well known hardware, you may need to skip ssh to skip Host Key Check (which is not adviced but in automated scripts in trusted environments, you require this)

$ ssh -o "StrictHostKeyChecking no" user@host
LQ Newbie
Posted in Uncategorized
Views 247 Comments 0 karanis is offline
Old

Set system time to HW clock (BIOS)

Posted 04-05-2020 at 04:24 PM by karanis
Updated 04-05-2020 at 04:26 PM by karanis (I didn`t mention to execute as root)
Tags ntp, time

# hwclock --systohc --localtime

You update your system time from ntp but sometimes, somehow, something happens and it can not sync to hardware clock as it should be and after reboot, you will need ntp again (with an internet connection).

This is a solution to sync ntp clock to BIOS but be aware that, your BIOS clock will need sync in 24 hours but if you do do not care about seconds, it will carry you along.

If you care about microseconds, hehe welcome...
LQ Newbie
Posted in Uncategorized
Views 247 Comments 0 karanis is offline

  



All times are GMT -5. The time now is 12:23 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration