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

简介: ssh centos linux

一、首先你已经装好了SecureCRT,并且已经激活

二、将下载下来的文件保存在你容易找到的地方,把后缀修改成py或者vbs,这里修改成了vbs

ImportArbitraryDataFromFileToSecureCRTSessions

下载地址:https://forums.vandyke.com/showpost.php?p=37089&postcount=1

20200805191818217.png

三、编写你需要添加的主机信息,文件格式可为.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


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


   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.

   folder: Relative path for session as displayed in the Connect dialog.

   hostname: The hostname or IP for the remote server.

   protocol: The protocol (SSH2, SSH1, telnet, rlogin)

   port: The port on which remote server is listening

   username: The username for the account on the remote server

   emulation: The emulation (vt100, xterm, etc.)

   description: The comment/description. Multiple lines are separated with ‘\r’

   logon_script: The full path to the Logon Script filename for the session.


四、打开CRT,点击“脚本”–“运行” 。选择VBS脚本。选择含有所添加主机信息的文件

20200805193553196.png

五、添加完成后,可看到已创建test_folder文件夹,并创建了三个session。

20200805193849146.png

六、将连接SSH设置为接受并自动保存主机密钥:修改CRT配置文件夹下的SSH2.ini文件中的D:“Automatically Accept Host Keys”=00000000为D:“Automatically Accept Host Keys”=00000001。

SSH2.ini文件所在位置

2020080520034558.png

2020080520051943.png


七、设置自动登录账号密码。在新创建的session的文件夹右键,选择设置。

20200805194725408.png

20200805195156334.png

20200805195235692.png

2020080519541847.png

20200805195534277.png

点击确定之后,test_folder文件夹下面的所有session,都可以直接登录了


配置长连接

20200805195938473.png


相关文章
|
2月前
|
JavaScript 应用服务中间件 Linux
【应用服务 App Service】解决无法从Azure门户SSH登录问题
【应用服务 App Service】解决无法从Azure门户SSH登录问题
|
2月前
|
机器学习/深度学习 存储 Linux
【机器学习 Azure Machine Learning】使用VS Code登录到Linux VM上 (Remote-SSH), 及可直接通过VS Code编辑VM中的文件
【机器学习 Azure Machine Learning】使用VS Code登录到Linux VM上 (Remote-SSH), 及可直接通过VS Code编辑VM中的文件
|
2月前
|
安全 Shell Linux
如何禁止某个用户使用ssh登录
本文介绍了五种禁止用户通过SSH登录的方法:1) 修改`/etc/ssh/sshd_config`文件中的`DenyUsers`和`DenyGroups`来阻止特定用户或用户组登录;2) 将用户的默认shell设置为`/usr/sbin/nologin`或`/bin/false`以禁用其SSH访问;3) 利用PAM(可插入认证模块)通过编辑`/etc/security/sshd.conf`来限制登录权限;4) 通过编辑`/etc/hosts.deny`文件拒绝特定用户的SSH访问;5) 锁定或禁用用户账号以阻止所有类型的登录。每种方法都提供了详细的步骤指导。
234 1
|
2月前
|
存储 安全 测试技术
【超实用却暗藏杀机】sshpass:一键免密SSH登录的神器,为何生产环境却要敬而远之?探秘背后的安全隐患与替代方案!
【8月更文挑战第16天】sshpass 是一款便捷工具,可实现自动化SSH登录,简化脚本中的远程连接流程。通过后台自动处理密码输入,便于执行远程操作,如 `sshpass -p 'yourpassword' ssh user@remotehost`。也可结合更多SSH选项使用,例如指定私钥文件。然而,因需明文传递密码,存在较大安全隐患,不适于生产环境;推荐使用公钥认证以增强安全性。
87 4
|
2月前
|
安全 Linux Shell
Linux系统之间实现免密码登录(SSH无密码登录
【8月更文挑战第21天】要在Linux系统间实现SSH免密码登录,需先在源机器生成SSH密钥对,然后将公钥复制到目标机器的`.ssh/authorized_keys`文件中。可通过`ssh-keygen`命令生成密钥,并使用`ssh-copy-id`命令传输公钥。最后测试SSH连接,确保能无密码登录。若目标机器缺少相关目录或文件,需手动创建并设置适当权限。完成这些步骤后,即可实现安全便捷的免密码登录。
80 0
|
2月前
|
Ubuntu Linux 网络安全
在Linux中,如何禁用root用户直接SSH登录?
在Linux中,如何禁用root用户直接SSH登录?
|
3月前
|
安全 Linux 网络安全
|
2月前
|
存储 安全 Linux
说到Linux安全,SSH限制IP登录绕不开这3种方法!
说到Linux安全,SSH限制IP登录绕不开这3种方法!
|
2月前
|
Linux 网络安全 数据安全/隐私保护
Linux——配置SSH免密登录
Linux——配置SSH免密登录
48 0
|
2月前
|
Linux 网络安全 数据安全/隐私保护
配置ssh免密登录
配置ssh免密登录
130 0