Linux Security Cookbook [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Security Cookbook [Electronic resources] - نسخه متنی

Daniel J. Barrett, Robert G. Byrnes, Richard Silverman

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










Recipe 6.12 Tailoring SSH per Host



6.12.1 Problem




You want to simplify a complicated SSH
command line, or tailor SSH clients to operate differently per remote
host.


6.12.2 Solution


Create a host alias in
~/.ssh/config:

~/.ssh/config:
Host mybox
HostName mybox.whatever.example.com
User smith
...other options...

Then connect via the alias:

$ ssh mybox


6.12.3 Discussion


OpenSSH
clients obey configurations found in
~/.ssh/config. Each configuration begins with
the word Host followed by an hostname alias of your
invention.

Host work

Immediately following this line, and continuing until the next
Host keyword or end of file, place configuration
keywords and values documented on the ssh(1) manpage. In this recipe
we include the real name of the remote machine
(HostName), and the remote username
(User):

Host work
HostName mybox.whatever.example.com
User smith

Other useful keywords (there are dozens) are:

IdentityFile ~/.ssh/my_alternate_key_dsa           Choose a private key file
Port 12345 Connect on an alternative port
Protocol 2 Use only the SSH-2 protocol


6.12.4 See Also


ssh_config(5) defines
the client configuration keywords.

/ 247