Posts Tagged ‘cent os’

How to copy a single file to multiple directories in Linux or Unix

Monday, January 16th, 2017

How to copy a single file to multiple directories in Linux or Unix
If I want to copy a single file into three locations (directories), by using a single (e.g. cp file /dir1/ /dir2/ /dir3/. Would that be possible? If yes, please provide the command for GNU/Linux or Unix operating systems. The short answer is no. You can not use GNU/cp or BSD/cp to copy a single file […]
Halal Vitamins

Powered by WPeMatico

How to fix: MacOS keep asking passphrase for ssh key after upgrade or reboots

Monday, January 16th, 2017

How to fix: MacOS keep asking passphrase for ssh key after upgrade or reboots
I recently upgraded my MacOS Sierra and now ssh command keep asking for passphrase as follows when I try to login to my remote Linux/Unix server:       Enter passphrase for key ‘/Users/vivek/.ssh/id_ed25519’: How do I fix MacOS Sierra upgrade that keep breaking ssh keys in terminal? My MacOS used to remember the ssh passphrase, but now […]
Halal Vitamins

Powered by WPeMatico

Patch your FreeBSD server for openssh vulnerabilities [11/Jan/2017]

Wednesday, January 11th, 2017

Patch your FreeBSD server for openssh vulnerabilities [11/Jan/2017]

OpenSSH is critical for both sysadmin and programmers. It is an implementation of the SSH protocol suite, from OpenBSD project. It provides an encrypted session to your server.

OpenSSH multiple vulnerabilities

OpenSSH has multiple vulnerabilities as of 11th January 2017 running on FreeBSD operating system. From the advisory:

The ssh-agent(1) agent supports loading a PKCS#11 module from outside a trusted whitelist. An attacker can request loading of a PKCS#11 module across forwarded agent-socket. [CVE-2016-10009]

When privilege separation is disabled, forwarded Unix domain sockets would be created by sshd(8) with the privileges of ‘root’ instead of the authenticated user. [CVE-2016-10010]

Solution

I updated my vulnerable FreeBSD box via a binary patch:
# freebsd-update fetch
# freebsd-update install
# service sshd restart
# ps aux | grep -i ssh-agent

If found any ssh-agent process, kill all running ssh-agent:
# killall ssh-agent

Fig.01: Fixed FreeBSD-SA-17:01.openssh

Fig.01: Fixed FreeBSD-SA-17:01.openssh

For more info see FreeBSD security mailing list.

Halal Vitamins

Powered by WPeMatico

Awesome comic explains HTTP status code

Wednesday, January 11th, 2017

Awesome comic explains HTTP status code

HTTP response status codes indicate whether a specific HTTP request has been successfully completed. However, I guess you know that. If you or your friend wanted a refresh course, check out this comic.

Web Server HTTP Status codes

Also check out

  1. HTTP status code using doggo
  2. HTTP status code using kitten

Comic credit

  • Taken from monkeyuser.com comics page.

Halal Vitamins

Powered by WPeMatico

How to speeding up SSH session creation

Wednesday, January 11th, 2017

How to speeding up SSH session creation

You can reuse OpenSSH connections to the same server when you want to open subsequent connections to the same server. For example, if I ran ssh vivek@server42.cyberciti.biz, the ssh client will establish a new SSH connection. It usually takes only a few seconds. However, if I run ssh vivek@server42.cyberciti.biz command again, connecting to a server42.cyberciti.biz multiple times result into the overhead.

This tutorial talks about ssh features called multiplexing that reuse an already-established connection when creating a new SSH session.

Halal Vitamins

Powered by WPeMatico

How to check the file size in Linux/Unix bash shell scripting

Wednesday, January 11th, 2017

How to check the file size in Linux/Unix bash shell scripting

I am a new bash shell scripting user. How do I find out the size of a file in my bash shell script and store this file size in a bash shell variable?
Halal Vitamins

Powered by WPeMatico

Linux / Unix: “-bash: python: command not found” error and solution

Wednesday, January 11th, 2017

Linux / Unix: “-bash: python: command not found” error and solution

I am a new user and trying to run Python program. I have a cloud based VM/VPS and when I type python mycode.py at the terminal of my server, I get the following error:
-bash: python: command not found

How do I solve this problem?
Halal Vitamins

Powered by WPeMatico

Change Shell To Bash

Wednesday, January 11th, 2017

Change Shell To Bash

How do I switch from a ksh shell to bash on Linux or Unix system? How to change shells on Unix-like system?
Halal Vitamins

Powered by WPeMatico

Talos Secure POWER8 Linux Workstation With Fully Open Source Firmware

Monday, January 9th, 2017

Talos Secure POWER8 Linux Workstation With Fully Open Source Firmware
Raptor Engineering is working and crowdfunding a high-end power8 based desktop computer with zero proprietary firmware blobs in the Talos Secure Workstation. Traditionally IBM, Oracle(Sun), Intel/AMD and others ruled this market segment. But now there is competition to Intel for a desktop computer.
talos openpower
Halal Vitamins

Powered by WPeMatico

How to secure MongoDB on Linux or Unix production server

Monday, January 9th, 2017

How to secure MongoDB on Linux or Unix production server

MongoDB ransom attacks are in Wild. I am using it for storing data on my public facing cloud server powered by Ubuntu Linux. How do I protect and secure my MongoDB nosql server on Linux or Unix operating system?
Halal Vitamins

Powered by WPeMatico