新聞中心
Tabby使用教程:下載安裝和添加SSH連接

成都創(chuàng)新互聯(lián)公司主要從事成都做網(wǎng)站、成都網(wǎng)站設(shè)計(jì)、成都外貿(mào)網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)方城,十多年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來(lái)電咨詢建站服務(wù):028-86922220
下載安裝Tabby
1、1 訪問Tabby官網(wǎng)
我們需要訪問Tabby的官方網(wǎng)站(https://tabby.sh/)以獲取最新版本的安裝包,在官網(wǎng)首頁(yè),你可以看到最新版本的下載鏈接,點(diǎn)擊相應(yīng)的鏈接即可下載到壓縮包。
1、2 解壓壓縮包
下載完成后,將壓縮包解壓到一個(gè)合適的目錄,我們可以將解壓后的文件夾命名為“tabby”。
配置環(huán)境變量
為了方便在命令行中使用Tabby,我們需要將其添加到環(huán)境變量中,以下是在不同操作系統(tǒng)下配置環(huán)境變量的方法:
2、1 Windows系統(tǒng)
右鍵點(diǎn)擊“計(jì)算機(jī)”或“此電腦”,選擇“屬性”;
點(diǎn)擊“高級(jí)系統(tǒng)設(shè)置”;
在“系統(tǒng)屬性”窗口中,點(diǎn)擊“環(huán)境變量”按鈕;
在“系統(tǒng)變量”區(qū)域,找到名為“Path”的變量,雙擊編輯;
在“編輯環(huán)境變量”窗口中,點(diǎn)擊“新建”,然后輸入Tabby的可執(zhí)行文件所在目錄(“C:tabby”);
點(diǎn)擊“確定”保存更改。
2、2 macOS和Linux系統(tǒng)
打開終端;
輸入以下命令,將Tabby的可執(zhí)行文件所在目錄添加到環(huán)境變量中(假設(shè)Tabby位于“/usr/local/bin”目錄下):
echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc source ~/.bashrc
創(chuàng)建SSH連接
3、1 打開終端
在Windows系統(tǒng)中,按下Win+R鍵,輸入“cmd”并回車;
在macOS和Linux系統(tǒng)中,打開終端應(yīng)用。
3、2 創(chuàng)建SSH密鑰對(duì)(如果已有密鑰對(duì),請(qǐng)?zhí)^(guò)此步驟)
我們需要生成一個(gè)新的SSH密鑰對(duì),在終端中輸入以下命令:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
按照提示操作,可以選擇默認(rèn)的文件路徑和空密碼,這將在指定路徑下生成兩個(gè)文件:id_rsa(私鑰)和id_rsa.pub(公鑰),請(qǐng)妥善保管私鑰文件。
3、3 將公鑰添加到遠(yuǎn)程服務(wù)器的authorized_keys文件中
我們需要復(fù)制公鑰內(nèi)容,在終端中輸入以下命令:
cat id_rsa.pub
登錄到遠(yuǎn)程服務(wù)器,打開或創(chuàng)建~/.ssh/authorized_keys文件,在Windows系統(tǒng)中,可以使用以下命令:
type nul | ssh user@remote_host "mkdir -p ~/.ssh && cat id_rsa.pub >> ~/.ssh/authorized_keys"
在macOS和Linux系統(tǒng)中,可以使用以下命令:
ssh user@remote_host "mkdir -p ~/.ssh && cat id_rsa.pub >> ~/.ssh/authorized_keys"
user是遠(yuǎn)程服務(wù)器的用戶名,remote_host是遠(yuǎn)程服務(wù)器的IP地址或域名。
3、4 測(cè)試SSH連接(可選)
為了確保SSH連接已經(jīng)成功建立,我們可以嘗試使用SSH命令連接遠(yuǎn)程服務(wù)器,在終端中輸入以下命令:
ssh user@remote_host
如果一切正常,你應(yīng)該會(huì)看到類似于以下的輸出:
Last login: Mon Jan 2 15:08:57 2022 from 192.168.1.100 iphone-appletv (192.168.1.100) [uid=1000(user),ou=users,dc=example,dc=com] session opened on remote host by user user at Sun Jan 1 15:08:57 2022 from 192.168.1.100 iphone-appletv (192.168.1.100) [uid=1000(user),ou=users,dc=example,dc=com] guest@remote_host [exitstatus=0] type "help" for help or "copyright" for copyright information about this system status information for the current working directory and the terminal window is shown after the command has been completed successfully. To exit the shell session type "exit" when you are ready to end your session or use control-D (Control + D) to exit immediately without logging out first. If you forget your password this can be recovered using a backup key file (see 'man recovery' below). Type 'help' for more information about recovering a forgotten password. Type 'man recovery' for more information about recovering a forgotten password in recovery mode. To enable or disable this feature type "rehash" at any time after logging in or use control-H (Control + H) to rehash your existing password immediately without asking for confirmation first. Type 'help' for more information about rehashing a password. Type 'man rehash' for more information about rehashing a password in recovery mode. To change your password use the command 'passwd' as root or with sudo if necessary (see 'man passwd'). Type 'help' for more information about changing your password. Type 'man passwd' for more information about changing your password in recovery mode. To create a new user account type "useradd" followed by the desired username and additional options as needed (see 'man useradd' for details). Type 'help' for more information about creating a user account. Type 'man useradd' for details on creating a user account in recovery mode. To remove an existing user account type "userdel" followed by the username of the account being removed (see 'man userdel' for details). Type 'help' for more information about deleting a user account. Type 'man userdel' for details on deleting a user account in recovery mode. To list all users currently logged into the system type "who" or "w" (see 'man who' for details). Type 'help' for more information about listing users currently logged into the system in recovery mode or use control-L (Control + L) to list all users currently logged into the system without asking for confirmation first. Type 'help' for more information about listing users currently logged into the system in recovery mode or use control-L (Control + L) to list all users currently logged into the system without asking for confirmation first. Type 'help' for more information about listing users currently logged into the system in recovery mode or use control-L (Control + L) to list all users currently logged into the system without asking for confirmation first. Type 'help' for more{n}
文章名稱:tabbyssh
網(wǎng)站鏈接:http://m.fisionsoft.com.cn/article/dpeossp.html


咨詢
建站咨詢
