made remote ssh reference ddns
This commit is contained in:
+43
-25
@@ -1,10 +1,10 @@
|
|||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# Auth: dodd
|
# Auth: dodd
|
||||||
# File: .zshrc
|
# File: .zshrc
|
||||||
# Revn: 09-06-2023 0.1
|
# Revn: 04-11-2024 1.0
|
||||||
# Func: Define user-made aliases and functions to make using the terminal easier
|
# Func: Define user-made aliases and functions to make using the terminal easier
|
||||||
#
|
#
|
||||||
# TODO: come up with new things to change
|
# TODO: make bt functions to check for connection before dc/connecting
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# CHANGE LOG
|
# CHANGE LOG
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -12,6 +12,15 @@
|
|||||||
# copied over useful aliases from ocelot
|
# copied over useful aliases from ocelot
|
||||||
# wrote function to ssh into ocelot remotely, ip robust
|
# wrote function to ssh into ocelot remotely, ip robust
|
||||||
# 09-09-2023: added aliases to gcc and g++
|
# 09-09-2023: added aliases to gcc and g++
|
||||||
|
# 09-10-2023: added moved tdm and donut to ~/bin/, changed alias accordingly
|
||||||
|
# 09-15-2023: made ocelot and sentinel try local ssh before using $ip
|
||||||
|
# 09-18-2023: added vim alias to correct vim loading shitty colors
|
||||||
|
# 12-28-2023: added blueutil aliases to connect/dc from M50x's
|
||||||
|
# 01-18-2024: converted btutil aliases into functions
|
||||||
|
# added power on/off to btfunctions
|
||||||
|
# 04-11-2024: removed constant ip call, because of ddns (thanks luke)
|
||||||
|
# added o and p flags to ls alias
|
||||||
|
# gutted remote ssh calls, replaced with ddns
|
||||||
#
|
#
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
@@ -20,48 +29,57 @@
|
|||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
### Shows everything in detail, except . and ..
|
### Shows everything in detail, except . and ..
|
||||||
alias ll="ls -AFGhl"
|
# A - list ALL ( except for . and .. )
|
||||||
alias l="ls -AFGhl"
|
# F - put symbols behind items in list
|
||||||
|
# G - force color
|
||||||
|
# h - human readable file sizes
|
||||||
|
# l - long, list long
|
||||||
|
# o - list long, omit group
|
||||||
|
alias ll="ls -AFGhlo"
|
||||||
|
alias l="ls -AFGhlo"
|
||||||
|
|
||||||
### Go home
|
### Go home
|
||||||
alias home="cd ~"
|
alias home="cd ~"
|
||||||
|
|
||||||
|
### local ssh
|
||||||
|
alias ocelot="ssh ocelot@192.168.1.120"
|
||||||
|
alias sentinel="ssh -p 23 pi@192.168.1.169"
|
||||||
|
alias rocelot="ssh ocelot@kaer-morhen.kozow.com"
|
||||||
|
alias rocelot="ssh -p 23 pi@kaer-morhen.kozow.com"
|
||||||
|
|
||||||
|
|
||||||
### mac gcc is an alias for clang
|
### mac gcc is an alias for clang
|
||||||
### after downloading gcc, it's not in the global bin, it's local
|
### after downloading gcc, it's not in the global bin, it's local
|
||||||
alias gcc="/usr/local/bin/gcc-13"
|
alias gcc="/usr/local/bin/gcc-13"
|
||||||
alias g++="/usr/local/bin/g++-13"
|
alias g++="/usr/local/bin/g++-13"
|
||||||
|
|
||||||
### donut
|
### donut
|
||||||
alias donut="~/donut"
|
alias donut="~/bin/donut"
|
||||||
|
|
||||||
|
### tdm
|
||||||
|
alias tdm="~/bin/tdm"
|
||||||
|
alias vim="vim +\"colo real_def\""
|
||||||
|
|
||||||
### load changes to .zshrc
|
### load changes to .zshrc
|
||||||
alias src="source ~/.zshrc"
|
alias src="source ~/.zshrc"
|
||||||
|
|
||||||
### ssh into ocelot
|
|
||||||
alias ocelot="ssh ocelot@192.168.1.120"
|
|
||||||
|
|
||||||
### ssh into sentinel
|
|
||||||
alias sentinel="ssh pi@192.168.1.169"
|
|
||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
### ssh into ocelot remotely
|
### turn on bluetooth and connect to m50x-bt
|
||||||
rocelot() {
|
### TODO make more robust? how does btutil react when bt is on
|
||||||
# grab ip from ip repo
|
### btutil -p 1 is run?
|
||||||
ip=$( cat ~/Documents/work/tax-returns-1997/data )
|
bt() {
|
||||||
# ssh into ip from repo
|
blueutil -p 1
|
||||||
ssh ocelot@$ip
|
blueutil --connect 00-0a-45-19-a0-4e
|
||||||
}
|
}
|
||||||
|
|
||||||
### ssh into ocelot remotely
|
|
||||||
rsentinel() {
|
### turn off bluetooth and dc from m50x-bt
|
||||||
# grab ip from ip repo
|
btdc() {
|
||||||
ip=$( cat ~/Documents/work/tax-returns-1997/data )
|
blueutil --disconnect 00-0a-45-19-a0-4e
|
||||||
# ssh into ip from repo
|
blueutil -p 0
|
||||||
# specify port 23, according to router settings, ssh port was
|
|
||||||
# moved from 22 to 23, to avoid collision with ocelot
|
|
||||||
ssh -p 23 pi@$ip
|
|
||||||
}
|
}
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|||||||
Reference in New Issue
Block a user