ssh trick – ssh to remote host with bastion host

2019-09-16 1 min read bash Learning Linux
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 through the bastion host or do ssh to bastion host and then ssh from there to the actual host. But wait, there is always a better way: ssh -t <bastion host> ssh -t <actual host> You can use the usernames as required for the 2 hosts and then you will have to enter passwords, first for the bastion host and then the actual host. Continue reading

ssh – host hopping (with Jump host)

2018-08-20 1 min read Linux
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 finally to host h3. This can be done with .ssh/config file but for that I need to have some program like nc installed on all the hosts in between which might not be practical in all cases. Continue reading

ss – utility to investigate sockets.

2011-09-07 1 min read Fedora Linux
Sometimes, you find some interesting application/command by accident, and that is just what happened a few days back. Well, I was doing a ssh and as usual made my share of mistake in typing and missed the “h” from the ssh command and saw a list of options instead of my prompt on remote server. Now, that set me thinking and fond that its a very interesting command that comes with iproute on Fedoara, so if you want this command, then install iproute like this Continue reading

[Solved] ssh works but scp does not

2011-08-29 1 min read bash Fedora Linux
Image via Wikipedia For quite sometime now, I was having this issue, that for the home system, I was able to connect to is using ssh but it never worked. Fnally after quite some debugging finally I found that the issue was with thebashrc. So, everytime I had to do a scp I would have to move/rename bashrc and do the reverse action after the scp was done. Finally today I fixed it and the solution was very simple. Continue reading

Try all colors in xterm with script before setting the color

2011-03-18 2 min read bash Fedora Learning Linux
If you are looking for testing the colors on how they would look like in the xterm before you set the color then here is a small script for you. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 <td> <div class="text codecolorer"> #!/bin/bash -<br /> #===============================================================================<br /> #<br /> # FILE: xterm_colors-test. Continue reading