922ad6db8b
* add yts_torrents project (#116) * add yts_torrents project * Added Python Script HacktoberFest 2019 (#128) * Added whatsapp-message Script * Update README.md * Script: Importance Checker (Updated Project List) (#132) * Add files to fork * Update README.md * Fixed ToDoBot link (#133) To Do bot link was using "-" instead of %20 Changed path to folders Removed full repo path to folders to make project robust to cloning as discussed on issue #139 on [AzureNotebooks](https://github.com/Microsoft/AzureNotebooks/issues/193). Fixed clean up photo directory name Fixed file organizer link Script: Importance Checker (Updated Project List) (#132) * Add files to fork * Update README.md Squash Squash Fixed ToDoBot link To Do bot link was using "-" instead of %20 parent 7c58b564104cdd1990492276292f04ec19009e57 author MatTerra <mateus.b.s.terra@gmail.com> 1574710004 -0300 committer MatTerra <mateus.b.s.terra@gmail.com> 1574710650 -0300 Squash Fixed ToDoBot link To Do bot link was using "-" instead of %20 Squash Changed path to folders Removed full repo path to folders to make project robust to cloning as discussed on issue #139 on [AzureNotebooks](https://github.com/Microsoft/AzureNotebooks/issues/193). Fixed ToDoBot link To Do bot link was using "-" instead of %20 Script: Importance Checker (Updated Project List) (#132) * Add files to fork * Update README.md * All changes made : Script added (#130) * Added whatsapp-message Script * Update README.md Co-authored-by: Ayush Bhardwaj <classicayush@gmail.com> * Revert "All changes made : Script added (#130)" (#135) This reverts commit |
||
---|---|---|
.. | ||
README.md | ||
ssh_adder | ||
ssh_adder.py |
SSH Host adder
This is a fairly simple script which adds hosts to an ssh config file. SSH allows you to add hosts to a config file, so you don't have to remember ip addresses or hostnames. So if you add:
HOST test
HostName 192.168.80.1
User root
Port 22
to ~/.ssh/config
, you can just do ssh test
instead of writing the address / user / port.
But when you constantly get new servers to ssh to, it's helpful to have a script!
Usage:
./ssh_adder my_host 192.168.80.1 [--user myuser] [--port 2200]
--user
and --port
are optional and default to root
and 22
respectively.
If you aren't using the default ssh config path, there is an argument for that as well:
./ssh_adder my_host 192.168.80.1 --conf /path/to/config
-conf
defaults to ~/.ssh/config
SSH configs allow you to make more complex operations, like adding different keys and whatnot, which I don't support here mostly because I haven't had a need to yet. If I get to updating my script some time, I'll update it here too.