株式会社エキスパートエンタープライズ

ページを読みこみ中・・・

SSHクライアントキーにて相手サーバーに自動ログイン設定する手順です。  CentOS 6.x対応CentOS 7.x対応

サーバー側の認証でキー認証が有効である前提です。

パスフレーズを設定していない手順と成ります。

1  「scp ~/.ssh/id_rsa.pub 相手先ユーザー名@相手先ホスト:~/.ssh/適当な名称」を入力

[root@centos ~]# scp ~/.ssh/id_rsa.pub root@centos2:~/.ssh/centos.pub
The authenticity of host 'centos2 (centos20)' can't be established.
RSA key fingerprint is 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'centos2' (RSA) to the list of known hosts.
root@centos2's password:
id_rsa.pub                                 100%  406     0.4KB/s   00:00
			


3  対象サーバーへログイン後「cat /.ssh/適当な名称 >> ~/.ssh/authorized_keys」を入力

[root@centos2 ~]# cat /.ssh/centos.pub >> ~/.ssh/authorized_keys
			


*  接続元より再度自動ログイン確認

[root@centos ~]# ssh  root@centos2 ls .ssh #確認
authorized_keys
id_rsa
id_rsa.pub
			


*  完了



 CentOS 6.x/ CentOS 7.x セットアップ記録 各種設定 SSHクライアントキー生成 SSH自動ログイン設定 ホスト名設定 日本語ロケール設定 日本タイムゾーン設定 VMwere Tools for CentOS 6.x インストール方法 廃止予定 VMwere Tools for CentOS 7.x インストール方法 廃止予定 Open VM Tools for CentOS 6.x インストール方法 Open VM Tools for CentOS 7.x インストール方法 インストール済RPM・OSの一括アップデート方法 yumにてミラーを日本サイトのみにフィルタする方法 NFSクライアント設定方法 yum リポジトリ設定 EPEL リポジトリ設定 更新 IUS リポジトリ設定 nginx リポジトリ設定 Remi's リポジトリ設定 The Software Collections ( SCL ) リポジトリ設定 ZFS on Linux リポジトリ設定 OS インストール CentOS 6.x インストール方法 CentOS 7.x インストール方法 インストール Python pip インストール node.js 0.x系 インストール node.js 5.x系 インストール rsync インストール Ansible インストール whois インストール for CentOS 6.x whois インストール for CentOS 7.x PHP 5.4インストール for CentOS 6.x ルートキットチェックツール ZFS on Linux インストール 更新 各利用方法 whois コマンド 使い方 shutdown コマンド 使い方 ZFS利用方法 ZFSプール作成方法 ZFS領域作成方法 ZFSマウント先設定方法 ZFS重複排除設定方法 ZFS圧縮設定方法 Tips ホスト名情報表示 インストールOSバージョン情報表示
広告

Facebookも情報発信中!
広告