Tag Archives: ubuntu

Linux/Unix: Force ssh client to use only password auth authentication when pubkey auth configured

Linux/Unix: Force ssh client to use only password auth authentication when pubkey auth configured

I configured and use my openssh server to accept only public key based authentication. I need to test if my server accepting password. How to allow ssh client to use only password auth when pubkey auth configured?
Halal Vitamins

Powered by WPeMatico

7 Awesome Open Source Web Performance Software For Linux and Unix-like Systems

7 Awesome Open Source Web Performance Software For Linux and Unix-like Systems
Web performance is nothing but the speed in which web pages are downloaded and displayed on the user’s web browser. Faster website speeds have been shown to increase sales or increase visitor loyalty including user satisfaction. Particularly useful for those use slow internet connections or on mobile phones/tablets. You can increase the speed of page load using:

  1. Server side cache
  2. Browser side cache
  3. Faster disks
  4. Image optimization
  5. Web application accelerator focusing on optimizing caching and compression
  6. Load balancing and SSL offloading
  7. Geo or DNS-based load balancing and more.

In short, one can increase the time it takes for pages to render using multi-layered cache and asynchronous communication with server-side components. In this post, I will list my favorite open source software based TCP/HTTP load balancer and proxying solution for web performance.
Halal Vitamins

Powered by WPeMatico

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

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

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]

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

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

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

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

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