Changed some stuff around, sshconnect gone in favor of sshconfig file, removed ssl create alias

This commit is contained in:
Nikolas Weger 2017-01-14 16:20:27 +01:00
parent 15454cd6ce
commit 43efe2fee9
3 changed files with 13 additions and 23 deletions

View file

@ -6,3 +6,4 @@
~/.nanorc: lib/nano/syntax/nanorc
~/.gitconfig: git/gitconfig
~/.zshrc: zsh/zshrc
~/.ssh/config: sshconfig

11
sshconfig Normal file
View file

@ -0,0 +1,11 @@
Host web
HostName megumi.eeleater.org
User eeleater
Host git
HostName git.eeleater.org
User eeleater
Host test
HostName test.eeleater.org
User eeleater

View file

@ -13,29 +13,7 @@ pclear () {
# Termbin
alias tb='nc termbin.com 9999'
# Create SSL One Line
sslcreate() {
if [[ "$1" = "create" ]]; then
openssl genrsa -out private/$2.key 2048
openssl req -new -key private/$2.key -out csr/$2.csr -sha256
openssl x509 -req -days 365 -in csr/$2.csr -signkey private/$2.key -out certs/$2.crt
fi
if [[ "$1" = "clear" ]]; then
rm -rf private/$2.key
rm -rf csr/$2.csr
rm -rf certs/$2.crt
fi
}
if [ $(uname -n) = "sayaka" -o $(uname -n) = "kimari" ]; then
# SSH Connect
sshconnect() {
[ $1 = "web" ] && ssh megumi.eeleater.org
[ $1 = "git" ] && ssh git.eeleater.org
[ $1 = "mail" ] && ssh eeleater.com
}
fi
# Make Dir and enter it
mkcd() {
mkdir $1 >/dev/null 2>&1
[ -e $1 ] && cd $1