ssh
mussh-run-commands-on-multiple-hosts
2022/03/06
mussh allows you to run command/commands on multiple hosts at the same time. If you have farm of server setup with passwordless ssh or with same password (which is generally the case), then using …
ssh trick – ssh to remote host with bastion host
2019/09/16
Lot of times, you have to ssh to a server with bastion host. If you dont know what is bastion host then see this: […] Now, in such cases, either you add an entry in “~/.ssh/config” to route the …
ssh – host hopping (with Jump host)
2018/08/20
Most of the times I need to jump hosts with ssh. What do I mean by that. Let me try to explain : Host Hopping If I need to got to host h3 then I need to first login to h1 and from there to host h2 and …
Send history of current host to some other host over ssh
2018/02/26
Sometimes I want to save the history of current host on another host. This is to ensure that I can use copy/paste on other host to run the commands. To this, I found a simple solution – history| ssh …
ssh – remove offending key.
2016/04/04
Whenever a system/server is re-installed or the host key changed for any reason, you would have seen the “host key verification failed”. And as usual you would have to go to known_hosts file and …
Executing commands on multiple hosts
2015/09/21
If you have to execute the same command in multiple hosts, then you can use mussh: […] First install mussh with the following command dnf install mussh Now to run this for multiple hosts, you …
ssh authorized keys – limit ssh session to custom command
2015/03/04
If you want a ssh key to be able to run a custom command only and nothing beyond that, then you can use the “command” option in the authorized_keys file of ssh. For example, to limit user to run only …
Multiple entry in .ssh/config file
2014/10/24
Here is a link to one post on ssh config file. However, if you want entries for lot of servers with their IPs or names, then it could be cumbersome to add all the entries in the .ssh/config file. So, …
Debuggging bash cron scripts.
2014/09/01
I have to several times debug scripts that I get complain about working when logging in normally but they do not work when run in cron mode. So, quite a lot of times, redirecting the stderr of the …
slow ssh connection
2013/02/26
If you are experiencing slow ssh connections, then possibly your system is trying to do reverse lookup of the IP address. If that is the case, then you can add the below to “hosts” line in …
ssh reverse tunning..
2013/02/14
If you want to access some local resources like the release website from the remote server when you are connecting to the remoter server using ssh over VPN, then possibly reverse ssh tunnelling is the …
Add ssh key to remote host
2011/11/15
Image via Wikipedia […] If you are working on recent versions of the *nix OS like Fedora or Ubuntu then you would know about the commad ssh-copy-id. But if you land up using one of the older …