How to make useful SSH Connection?

Usually you doing following steps:
1) You add public key.
> ssh add -K ~/.ssh/id_rsa_next
2) Connect to server
> ssh -i ~/.ssh/id_rsa_next root@myserver.com

Do it easy!
> ssh my-server

What do I need?
One step – edit your ssh_config.
What is ssh_config? This is system-wide default SSH client configuration file. It is overridden if one is also present in the user’s home directory (~/.ssh/config).

> vim ~/.ssh/config

Host *
ServerAliveInterval 60

Host peer
HostName 12.12.122.212
User peter
IdentityFile /Users/yandreev/.ssh/id_rsa_next

 

nice link: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Reference_Guide/s1-ssh-configfiles.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: