tabbyssh

Tabby使用教程:下载安装和添加SSH连接

成都创新互联公司主要从事成都做网站、成都网站设计、成都外贸网站建设、网页设计、企业做网站、公司建网站等业务。立足成都服务方城,十多年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:028-86922220

下载安装Tabby

1、1 访问Tabby官网

我们需要访问Tabby的官方网站(https://tabby.sh/)以获取最新版本的安装包,在官网首页,你可以看到最新版本的下载链接,点击相应的链接即可下载到压缩包。

1、2 解压压缩包

下载完成后,将压缩包解压到一个合适的目录,我们可以将解压后的文件夹命名为“tabby”。

配置环境变量

为了方便在命令行中使用Tabby,我们需要将其添加到环境变量中,以下是在不同操作系统下配置环境变量的方法:

2、1 Windows系统

右键点击“计算机”或“此电脑”,选择“属性”;

点击“高级系统设置”;

在“系统属性”窗口中,点击“环境变量”按钮;

在“系统变量”区域,找到名为“Path”的变量,双击编辑;

在“编辑环境变量”窗口中,点击“新建”,然后输入Tabby的可执行文件所在目录(“C:tabby”);

点击“确定”保存更改。

2、2 macOS和Linux系统

打开终端;

输入以下命令,将Tabby的可执行文件所在目录添加到环境变量中(假设Tabby位于“/usr/local/bin”目录下):

echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc
source ~/.bashrc

创建SSH连接

3、1 打开终端

在Windows系统中,按下Win+R键,输入“cmd”并回车;

在macOS和Linux系统中,打开终端应用。

3、2 创建SSH密钥对(如果已有密钥对,请跳过此步骤)

我们需要生成一个新的SSH密钥对,在终端中输入以下命令:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

按照提示操作,可以选择默认的文件路径和空密码,这将在指定路径下生成两个文件:id_rsa(私钥)和id_rsa.pub(公钥),请妥善保管私钥文件。

3、3 将公钥添加到远程服务器的authorized_keys文件中

我们需要复制公钥内容,在终端中输入以下命令:

cat id_rsa.pub

登录到远程服务器,打开或创建~/.ssh/authorized_keys文件,在Windows系统中,可以使用以下命令:

type nul | ssh user@remote_host "mkdir -p ~/.ssh && cat id_rsa.pub >> ~/.ssh/authorized_keys"

在macOS和Linux系统中,可以使用以下命令:

ssh user@remote_host "mkdir -p ~/.ssh && cat id_rsa.pub >> ~/.ssh/authorized_keys"

user是远程服务器的用户名,remote_host是远程服务器的IP地址或域名。

3、4 测试SSH连接(可选)

为了确保SSH连接已经成功建立,我们可以尝试使用SSH命令连接远程服务器,在终端中输入以下命令:

ssh user@remote_host

如果一切正常,你应该会看到类似于以下的输出:

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
本文URL:http://www.shufengxianlan.com/qtweb/news39/270439.html

网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联