NSS: client certificate not found (nickname not specified)?

Try prefixing the certificate filename with “./”, or using the full path. From the curl manpage: If curl is built against the NSS SSL library then this option [–cert] can tell curl the nickname of the certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the … Read more

I got warning setlocale LC_CTYPE when I ssh connect to vagrant centos 6

For CentOS or Amazon AMI Linux, add these lines to /etc/environment (create it, if it doesn’t exist): LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 To edit this file via SSH console, try sudo nano /etc/environment Edit For Debian-related distributions (Ubuntu, etc.), you should check that /etc/default/locale is empty. That’s the outcome of choosing None in dpkg-reconfigure locales which is suggested … Read more

How to find user memory usage in linux

This one-liner worked for me on at least four different Linux systems with different distros and versions. It also worked on FreeBSD 10. ps hax -o rss,user | awk ‘{a[$2]+=$1;}END{for(i in a)print i” “int(a[i]/1024+0.5);}’ | sort -rnk2 About the implementation, there are no shell loop constructs here; this uses an associative array in awk to … Read more

SSHD Gives error could not open Authorized Keys, although permissions seem correct

If the permissions are correct, SELinux might still be preventing sshd from opening the file. Try fixing the labels inside the .ssh directory (and maybe $HOME): restorecon -FRvv ~/.ssh If the user account uses non-standard home path, default labels for the path need to be added to the local configuration first: semanage fcontext -a -t … Read more

Which nginx-config file is enabled, /etc/nginx/conf.d/default.conf or /etc/nginx/nginx.conf?

Technically, nginx.conf is all that matters, if you define every thing inside there it would still work, but to keep things organized, they use include, somewhere at the end of nginx.conf you’ll see include /etc/nginx/conf.d/* and in some distros you’ll also find include /etc/nginx/sites-enabled/* this is a convention to keep things organized, you create your … Read more

tech