SecureCRT实现批量创建及导入session和批量SSH2登录

一、首先你已经装好了SecureCRT,并且已经激活
二、将下载下来的文件保存在你容易找到的地方,把后缀修改成py或者vbs,这里修改成了vbs
ImportArbitraryDataFromFileToSecureCRTSessions
下载地址:https://forums.vandyke.com/showpost.php?p=37089&postcount=1
在这里插入图片描述三、编写你需要添加的主机信息,文件格式可为.txt,或.csv按照这个这个模板填写
session_name,hostname,port,username,folder,protocol
test01,172.20.0.1,22,admim,test_folder,SSH2
test02,172.20.0.2,22,admim,test_folder,SSH2
test03,172.20.0.1,22,admim,test_folder,SSH2

可添加的各个字符串含义:

  1. session_name: The name that should be used for the session. If this field does not exist, the hostname field is used as the session_name.
  2. folder: Relative path for session as displayed in the Connect dialog.
  3. hostname: The hostname or IP for the remote server.
  4. protocol: The protocol (SSH2, SSH1, telnet, rlogin)
  5. port: The port on which remote server is listening
  6. username: The username for the account on the remote server
  7. emulation: The emulation (vt100, xterm, etc.)
  8. description: The comment/description. Multiple lines are separated with ‘\r’
  9. logon_script: The full path to the Logon Script filename for the session.

四、打开CRT,点击“脚本”–“运行” 。选择VBS脚本。选择含有所添加主机信息的文件
在这里插入图片描述五、添加完成后,可看到已创建test_folder文件夹,并创建了三个session。
在这里插入图片描述
六、将连接SSH设置为接受并自动保存主机密钥:修改CRT配置文件夹下的SSH2.ini文件中的D:“Automatically Accept Host Keys”=00000000为D:“Automatically Accept Host Keys”=00000001。
SSH2.ini文件所在位置
在这里插入图片描述在这里插入图片描述

七、设置自动登录账号密码。在新创建的session的文件夹右键,选择设置。
在这里插入图片描述在这里插入图片描述在这里插入图片描述在这里插入图片描述在这里插入图片描述点击确定之后,test_folder文件夹下面的所有session,都可以直接登录了

配置长连接
在这里插入图片描述

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值