LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ssh short way to access remote host? (https://www.linuxquestions.org/questions/linux-software-2/ssh-short-way-to-access-remote-host-4175446367/)

miros84 01-22-2013 01:46 AM

Quote:

Originally Posted by unSpawn (Post 4873696)
This is probably easier:
Code:

echo -en "Host myremotehost"\nHostName 10.10.10.10\nPort 1000\n" >> ~/.ssh/config

I tried this and config file is the easyest way I think.
But I prefer to edit the file, instead of echo. It is easy and work.

unSpawn 01-23-2013 08:21 PM

Quote:

Originally Posted by miros84 (Post 4875210)
I tried this and config file is the easyest way I think.

Yes, you're right. That's what configuration files are for after all...

miros84 01-24-2013 12:25 PM

Quote:

Originally Posted by unSpawn (Post 4876515)
Yes, you're right. That's what configuration files are for after all...

Problem is that files doesnot exist and I dont know for their existing. So I cannot explore their funcionality or man page.

TobiSGD 01-24-2013 12:30 PM

Quote:

Originally Posted by miros84 (Post 4876867)
Problem is that files doesnot exist and I dont know for their existing. So I cannot explore their funcionality or man page.

But you can explore the manual and will find a description of that config file in it: http://www.openssh.com/manual.html

unSpawn 01-24-2013 12:51 PM

In any regular Linux distribution "~/" should point to the users home (as in the environment variable "$HOME"). If the "~/.ssh" directory does not exist then you can create it as regular user with
Code:

install -d ~/.ssh -m 0700
and then create the file with
Code:

( umask 077 && touch ~/.ssh/config )
* 'man ssh_config' specifically holds the "Host" and other declarations should you want to read about it.


All times are GMT -5. The time now is 12:08 AM.