Saturday, January 10, 2026

SSL certificate keystore for Ansys SAM tomcat server

Getting SSL certificate for a domain using certbot (https://certbot.eff.org/) gives you four files: cert1.pem, chain1.pem, fullchain1.pem, privkey1.pem. These files can found in /etc/letsencrypt/archive/your.domain.name.

The files have to be bundled into a keystore (keystore.pfx) for use in tomcat. For this you can use:

openssl pkcs12 -export -in cert1.pem -inkey privkey1.pem -out keystore.pfx -name tomcat -CAfile chain1.pem -caname root -chain
"keystore.pfx" must be renamed to "keystore" and keystore password used when creating keystore.pfx have to be specified in server.xml.

More information at: https://hardwarehacks.org/blog/setting_up_tomcat_with_a_lets_encrypt_certificate/

Friday, January 09, 2026

ssh: LocalForward in ssh config file

Example to forward vnc 5901 port from server to client's 5903 port:
Host myserver
    HostName serverip
    User ubuntu
    IdentityFile ~/.ssh/private.pem
    LocalForward 5903 localhost:5901

tigervnc: on ubuntu example settings

/etc/tigervnc/vncserver-config-mandatory :
$session = "startfluxbox";
$SecurityTypes = "none";
$geometry = "2000x1200";
$localhost = "yes";
$AlwaysShared = "yes";


sudo systemctl enable --now tigervncserver@:1