Linux

Linux stuff

Special characters to show useful information in $PS1 prompt: \h short hostname (without domain). \H long hostname. \n new line. \s shell name (like bash, sh) \t 24h format clock. \u current username. \v shell version. \w current folder. Inside PS1 we can add the output of a specific command, preferably with short output, like  PS1=$(date) We can color the prompt messages just adding  \[\033[COLORm\]. and \[\033[0m\] to stop colors to avoid colored commands. Where COLOR Read more...
When in logs show messages like: postfix/qmgr[2381]: warning: connect to transport relay: No such file or directory postfix/qmgr[2381]: warning: connect to transport relay: No such file or directory trinity last message repeated 2 times you have emails unsent and should be deleted to clean postfix and avoid those annoying messages. To do that, You can check inside /var/spool/postfix/defer and find the ID's of deferred messages (inside defer folder a simple find will work). This folder contains Read more...
Create the shared key with puttygen: http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe Press generate and move the mose when requested. When finish, copy the text content of the window to a file, and save it in a safe place or save it clicking  "save public key" or "save private key".   Open putty.exe and in Connections >> SSH >> Auth, select private key file clicking in "Browse" and finding the key file saved previously. or you can use pageant: http://the.earth.li/~sgtatham/putty/latest/x86/pageant.exe And Read more...
With SSH you can create trust relationships between machines to connect between them without asking for password to be able to install Veritas software or just to connect quickly to remote systems. First, you must create the Secret and Public key with this command: # ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P '' You can choose dsa or rsa as type of ssh protocol version (should use the same as on sshd_config file). rsa is used with protocol 1 in ssh. dsa is used with protocol 2 in ssh. It Read more...
Configure vsftpd with SSL .- Check that we have vsftpd compiled with SSL support # ldd /usr/sbin/vsftpd | grep ssl libssl.so.5 => /lib/libssl.so.X .- Create a cert # openssl req -x509 -nodes -days 730 -newkey rsa:1024 -keyout /etc/ssl/certs/vsftpd.pem -out /etc/ssl/certs/vsftpd.pem .- Add on vsftpd.conf the following line [...] ssl_enable=YES allow_anon_ssl=NO force_local_data_ssl=NO force_local_logins_ssl=YES ssl_tlsv1=YES ssl_sslv2=NO ssl_sslv3=NO rsa_cert_file=/etc/ssl/certs/vsftpd.pem [...] .- Read more...