Skip to content

Instantly share code, notes, and snippets.

View raojeet's full-sized avatar

Jeet Yadav raojeet

  • Pixelwebwrox
  • Gurgaon
View GitHub Profile
@raojeet
raojeet / openssl_commands.md
Created January 21, 2023 08:10 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl

OpenSSL Playground

Certificates

Print Certificate ( crt file )

openssl x509 -in stackexchangecom.crt -text -noout

Print Certificate ( pem file )

openssl x509 -in cert.pem -text -noout

Print Certificate ( cer file )

openssl x509 -inform der -in foobar.cer -noout -text

Read part of Certificate
@raojeet
raojeet / setup_sftp.sh
Last active July 9, 2020 18:43 — forked from thomascannon/setup_sftp.sh
Script to setup a sftp service with KEY authentication
#!/bin/bash
# Assumes SSH is setup already with publickey authentication, i.e.
# PubkeyAuthentication yes
# PasswordAuthentication no
if [ "$EUID" -ne 0 ]
then echo "Please run with sudo"
exit
fi
@raojeet
raojeet / sftp
Last active April 25, 2020 06:15 — forked from manimike00/sftp
SFTP setup
STEPS to CREATE sftp
# generate key
ssh-keygen
#Configure an SSH/SFTP User for Your Key
#add public key in below path
.ssh/authorized_keys
To Create a SFTP server for user to login and access particular folder