ssh short way to access remote host?
Now, to access some remote access I use
Code:
ssh -p 1000 10.10.10.10 Code:
ssh myremotehost |
Hi
I just made a little script Code:
#!/bin/bash to run it I just type server |
This is probably easier:
Code:
echo -en "Host myremotehost"\nHostName 10.10.10.10\nPort 1000\n" >> ~/.ssh/config |
Where is config file? In /home/user/config?
If yes, I havenot got that folder created there. |
Similarly but differently, I use aliases. In /home/user:
Code:
echo "alias myremotehost=\"ssh 10.10.10.10 -p 1000\"" >> .bashrc |
Well you can use a wrench for a hammer if you want, but that is exactly what ~/.ssh/config is for.
|
Quote:
Is Code:
/home/user/.shh/config |
yes
|
"~" gets expanded by the shell to your current user's home path (also in $HOME environment variable).
|
I check that directory
Code:
/home/user/.shh/config |
Yes.
Code:
man ssh_config |
Quote:
Code:
echo -en "Host myremotehost\nHostName 10.10.10.10\nPort 1000\n" >> ~/.ssh/config |
WD, eagle eyes :-]
|
SSH
Quote:
easiest way in yet |
Quote:
|
All times are GMT -5. The time now is 01:56 AM. |