New answers tagged

0

If you don't have ssh-keygen installed, you can also use openssl directly key="/path/to/your.key" algo="-des3" # or -aes256 or ... openssl rsa $algo -in "$key" -out "$key.new" # and replace old key with new one mv "$key.new" "$key"


0

Here goes a Python one-liner. Should work on all OS: python -c "import sys, socket; print (socket.gethostbyname('<hostname>'))" This can be embedded easily in a shell script: function gethostip() { python -c "import sys, socket; print (socket.gethostbyname('$1'))" }


1

For compression, you can use an arbitrary compression tool, such as pigz (multithreaded gzip), pbzip2 (multithreaded bzip2) or xz -T0. The old and well-known .gz format is generated by pigz or gzip. A few more tools and algorithms (some multithreaded, some single-threaded): zstd -T0, lrzip, lzop, lz4, lzip However, your code snippet has an obvious data loss ...


2

Why does Ubuntu not include uuencode/uudecode out-of-the-box in all situations? Nothing requires Ubuntu, or any other system, to be Single Unix Specification compliant. Users that don't want sharutils might uninstall it. Especially on trimmed down images that have been optimized for space. Realize that typically installed programs vary by platform. GNU ...


1

you should using Include option above all the Host tag in ~/.ssh/config file. else ssh won't resovle the your Includes. Include ~/.ssh/config-* Host tunnel HostName database.example.com ....


0

This is the sethandler directive documentation: This describes the use of Apache's handlers


1

You can do this using exec-snoop (based on ebpf), tracepoints, audit, the netlink process connector, and some other mechanisms. I've written a comparison of all the methods here.


0

Found the issue "winbind use default domain = true" Need to turn it off or


0

I just stumbled upon this and the accepted answer looks VERY suspicious to me. As Nick ODell pointed out in the comments of the accepted answer, it is probably susceptible to directory traversal attacks. A better solution is to have a main web root in the server block and then use a symlink from the web root to the user directory. You can have multiple ...


Top 50 recent answers are included