Fedora 34にSSH クライアントをインストールする
1.OSの確認
[root@fedora ~]# cat /etc/redhat-release Fedora release 34 (Thirty Four)
2.sshクライアントをインストール
[root@fedora ~]# dnf -y install openssh-clients
3.一般ユーザでSSHサーバーに接続
[arkgame@fedora ~]$ ssh test@192.168.229.134 The authenticity of host '192.168.229.134 (192.168.229.134)' can't be established. ED25519 key fingerprint is SHA256:HNFulmQ4gXJtdCGT9y59ikNoYosqQ2YfaTJaTsfhrrE. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.229.134' (ED25519) to the list of known hosts. test@192.168.229.134's password: #パスワード入力 [test@fedora ~]$ #sshサーバーに接続できた ログアウトの操作 [test@fedora ~]$ exit ログアウト Connection to 192.168.229.134 closed. [arkgame@fedora ~]$
4.リモートホストでsshコマンドの引数にコマンドを指定する
[arkgame@fedora ~]$ ssh test@192.168.229.134 "ls /etc/ssh/sshd_config" test@192.168.229.134's password: /etc/ssh/sshd_config