Linux配置SSH服務實現遠端遠端訪問

2021-08-17 22:00:20 字數 995 閱讀 9167

1.查詢是否安裝ssh.

rpm -pa |grep ssh
2.如果沒有安裝rmp:

sudo apt-get install rpm          #ubuntu,debian

yum -y instal rpm #centos,redhat

3.安裝ssh

sudo apt-get install ssh

oryum -y install openssh

4.啟動服務:

service sshd start

or/bin/systemctl restart sshd.service

or/etc/init.d/sshd start

5.配置埠:

vim /etc/ssh/sshd_config
6.將port 前面的#刪除,也可以更改其它埠.

7.允許root使用者遠端登入.

8.檢視服務是否啟動:

9.遠端登入:

scp伺服器主機之間檔案互傳:

linux開啟ssh服務,實現ssh遠端登入

1.查詢是否安裝ssh.rpm pa grep ssh 2.如果沒有安裝rmp sudo apt get install rmp ubuntu,debian yum y instal rmp centos,redhat 3.安裝ssh sudo apt get install ssh oryum y...

Docker實現CentOS容器SSH遠端登入

這裡根據dockerfile方式構建乙個centos的可遠端ssh的映象。在 data test sshd centos 目錄下新建dockerfile檔案。注意 目錄可以自行設定,但目錄下除了dockerfile檔案外建議不要放置別的檔案和目錄。vim dockerfile 生成的新映象以cent...

Linux使用NFS服務實現遠端共享

首先是目錄,然後星號表示任何ip都能訪問 rw 讀寫,如果想要唯讀,可設為 o sync 資料同步寫入硬碟 no root squash 當遠端訪問使用root使用者時,不對映成,如果想用對映,可設為 root squash no subtree check 這個表示不確認父目錄的許可權,上面沒設定...