Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use batch processing to record the login of server remote terminal 3389

2025-03-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you how to use batch processing to record the login of the remote terminal 3389 of the server, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. let's learn about it!

It is useful if the server has multiple users or to see if other illegal users are logged in.

Under the D disk directory, create two files "ts2003.BAT" (the script file that the user runs when logging in) and "ts2003.LOG" (the log file).

Write a "ts2003.BAT" script file:

The code is as follows:

Time / t > > ts2003.log

Netstat-n-p tcp | find ": 3389" > > ts2003.log

Start Explorer

The first line of code is used to record the time the user logged in. "time / t" means to return the system time, using the appending symbol "> >" to record this time in "ts2003.LOG" as the log time field. The second line of code records the IP address of the end user. "netstat" is a command used to display the current network connection status, "- n" is used to display IP and port, "- p tcp" shows TCP protocol, pipe symbol "|" outputs the result of the "netstat" command to the "find" command, and then looks for the inclusion in the output. "

The above is all the contents of this article "how to use batch processing to record the login of the remote terminal 3389 of the server". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report