Fedora 36にSSH クライアントopenssh-clientsをインストールする

環境
OSバージョンを確認します

# cat /etc/redhat-release
Fedora release 36 (Thirty Six)

SSH クライアントの設定手順
1.SSH クライアントをインストールします

# dnf -y install openssh-clients

2.SSH サーバーに接続します
書式
ssh ログインユーザー@ホスト名 または IP アドレス
操作例

# ssh test01@fedora
The authenticity of host 'fedora (fe80::20c:29ff:fe9b:1d7f%ens33)' can't be established.
ED25519 key fingerprint is SHA256:QwU4btHTA9K+peD7POa7cJ7LJ0qQX2Z7jr5Pj9bG2P0.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'fedora' (ED25519) to the list of known hosts.
test01@fedora's password: #パスワード入力
Web console: https://fedora:9090/ or https://192.168.71.128:9090/

Last login: Sun May 22 11:16:44 2022 from 192.168.71.1
[test01@fedora ~]$

3.SSH コマンドの引数にコマンドを指定し、リモートホストでコマンドを実行します

$ ssh test01@fedora "ls -l /usr/local/src"
The authenticity of host 'fedora (fe80::20c:29ff:fe9b:1d7f%ens33)' can't be established.
ED25519 key fingerprint is SHA256:QwU4btHTA9K+peD7POa7cJ7LJ0qQX2Z7jr5Pj9bG2P0.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'fedora' (ED25519) to the list of known hosts.
test01@fedora's password:
合計 11308
-rw-r--r--. 1 root root 11576445 5月 11 17:06 apache-tomcat-9.0.63.tar.gz

 

Fedora 36

Posted by arkgame