When you are working with a lot of servers or terminal boxes, it would be very hard typing those long text with their parameters. Like for example, i connect with four(4) servers: let’s say that the servers’ IP addresses are 18.104.22.168, 22.214.171.124, 126.96.36.199, and 188.8.131.52. So everytime I connect with the first server, I would do this:
That would be very long, I mean what if you forgot the ip address? What if you don’t only have four(4) servers but 10? Would you be able to remember all those 10 ip? Well, you might, but it would be hard. So here’s one thing that you could do.
OS: Debian Etch
#1 In your home directory, type:
This would show you all the hidden files with its details. you will be able to see that there’s a .ssh folder.
#2 Go to the .ssh folder:
#3 If there’s a config file already, go immediately to step #4. If not, do the following:
sudo chmod 644 config
#4 Edit the config file with your favorite editor. In my case, i use vi:
#5 Add the following using this format:
that’s the basic format. you could add many hosts though.
#6 In your terminal, you can then write:
It makes things easier that way. 🙂
For killing a process:
ps auwx | grep -i <keyword>
The keyword there would be the name of the application, so if your firefox browser didn’t work properly or started hanging, you could type
pas auwx | grep -i mozilla
When all of the processes are displayed, look for its process id and execute this:
If it still doesn’t work, you might want to try:
kill -9 <process_id>
For checking your ip address or checking ethernet connections: