From 24639575c32e48a3db46e06be6a3a25cd80e8991 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 21 Apr 2022 15:04:56 +0300 Subject: refactor: change prject structure --- src/blog/2021-10-06.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/blog/2021-10-06.md (limited to 'src/blog/2021-10-06.md') diff --git a/src/blog/2021-10-06.md b/src/blog/2021-10-06.md new file mode 100644 index 0000000..4611853 --- /dev/null +++ b/src/blog/2021-10-06.md @@ -0,0 +1,17 @@ +# You should start using `ssh-copy-id` now! +Over the last couple of weeks I had to simultaneously manage up to 4 virtual machines in the Cloud. Holy shit, I've lost so much time just trying to log into them - picking up the correct server IP, then finding the password for it, and then finally `ssh`-ing into it. That's such a painful process, especially when you have to repeat it over and over again. + +Luckily, there's a solution! Simply run `ssh-copy-id username@password` (the same way you would do with `ssh`, just replacing it by `ssh-copy-id`), enter your password and it will remember it. Of course you gotta have your keys set up, but I think everyone has. + +Well, as a bonus, to not mess with the IPs, you can also use `~/.ssh/config` like that: +```bash +Host + HostName + User +``` +You might guess what it's doing: running `ssh ` will now expand to `ssh @`! + +Of course you can add as much hosts as you want to your config. Combined with `ssh-copy-id`, you get a perfect solution for managing multiple web servers. + +## PS +If you are familiar with `tmux`, I highly recommend installing it right away on your server, and doing everything in a session. Even simple `tmux new` / `tmux a` will make your life even more easy! -- cgit v1.2.3