In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
10 SecureCRT Tips-How Many Do You Play With?
SecureCRT, I believe I do not need to introduce too much of it, a remote device through telnet, SSH login terminal software.
Whether it is to engage in network, do system or even write programs, connect equipment must use software, easy to use, high stability, powerful functions.
However, in the face of SecureCRT dense function menu, how many are familiar with it?
Don't use SecureCRT as Putty
Let me guess how you usually use SecureCRT.
Step 1: Open the software.
Step 2: Open the session management bar on the left and select the device you want to connect.
Step 3: Double-click the link and go!
Step 4: Start playing the keyboard concerto.
This should be the most frequent SecureCRT usage habit and method in everyone's daily work.
However, if you want to use it like this, you may have lost your talent. SecureCRT is incredibly powerful.
It supports everything from basic connectivity devices to advanced run-time scripts and python programs.
And today, I'm going to share with you 10 very simple SecureCRT tips that will make your work easier.
Let's stop using SecureCRT as Putty.
Note: What is Putty?
Putty is also a telnet and ssh terminal free small software.
Single function, interface is not too friendly, work efficiency is much lower than SecureCRT.
Tip 1: Automatically record system logs
Configuration network or system equipment, logging must be a lot.
On the one hand, it records the interactive information of the equipment, which is convenient for follow-up tracing problems. At some critical times, it can definitely help you a lot.
For example, if there is a fault in the configuration process, you need to prove your innocence: Boss, I didn't restart the device, it hung up by itself.
If there is no log record at this time, it will be impossible to argue.
How do I get SecureCRT to log automatically every time I start a session?
The method was simple:
By modifying the global default settings, each session is automatically logged.
As follows:
Options-> Global Properties
Select General-> Edit Default Settings in Global Properties
Open the dialog box, select the log file, and finally select the directory of the log file.
By default, the name of the log file is session.log. But we can be more flexible and take the form of wildcards.
For example, in the above example, I defined the file name in the form of month-day-hour-session name.log. For specific parameters, please refer to the parameter table in the rectangle in the figure.
Once the definition is complete, save the configuration and apply it to all sessions.
The next time you connect to a session, it automatically creates a log file based on the above format in the specified directory.
PS: In the Options section, individuals recommend that it is best to select Overwrite files, e.g. when logging sessions repeatedly within a short period of time, since the log file names of the sessions are the same.
If you choose overwrite, subsequent files overwrite previous files with the same name.
If the file name is the same, the content of the later file is added directly to the first file.
Tip 2: Modify the session cache size
You may have encountered this problem: log in to the device to check the configuration.
However, because there are too many configurations, the SecureCRT window keeps outputting pages. When you want to look back, drag the window scroll bar to the top and find that the previous configuration is no longer visible, only the most recent configuration is still there.
This is because SecureCRT only displays up to 500 lines of content in real-time by default, discarding the topmost content after 500 lines.
If you want to change the number of rollback rows globally for all sessions, you can do so at:
Options-> Global Properties
Select General-> Edit Default Settings in Global Properties
Select Terminal-> Simulation in default settings
If you only want to modify a session.
Right-click the session you want to modify in the session manager and click Properties.
Either one of these eventually brings you to this interface, which looks like this:
In the figure above, you can change the value of the rollback buffer from 500 to other values. I usually set it to 50,000.
Tip 3: Multiple windows input simultaneously
Sometimes you need to output duplicate content in multiple session windows, or you need to restart several devices at once.
For the former, you can choose to paste the configuration manually one by one, but for time-sensitive tasks that require restarting several devices at the same time, there is a time lag no matter how fast your hand is.
SecureCRT gives you a very user-friendly tool that lets you choose to enter content into multiple windows at once.
First open the command line window.
Click View-> Command Line Window
When done, a horizontal box appears under SecureCRT. Right-click inside the box and select Send command to- > All sessions.
As shown below:
When that's done, let's do a demo. I've turned on four routers so far, and I can see the time of all four routers at the same time by showing clock:
Note: When using it, be sure to know the range of equipment you want to apply the configuration to. For example, if you choose to send commands to all sessions and then execute reboot, you want to execute one, but because of this reason, all session devices in SecureCRT are restarted, please be careful.
Tip 4: Anti-idle
This is easy to understand, some devices will automatically disconnect after a period of time without receiving input.
At this point we can set anti-idle, have SecureCRT send an anti-idle signal periodically, or most bluntly, send a custom key to the system.
In general, this custom key we use the space bar. At the same time, we can set a time, the default is 300 seconds, 5 minutes.
The configuration method is as follows:
Open the session properties box and select the terminal. The window on the right side of the terminal will have an Anti-idle configuration.
As shown below:
In the above configuration, I set SecureCRT to send a space bar to this session called EVE-NG03 every 5 minutes to prevent this session from being disconnected by the remote device.
Tip 5: Bring SFTP -Transfer files in minutes
Needless to say, file transfer is commonplace, but you do not know, SecureCRT is the most convenient file transfer software.
First you need to have a session, such as a remote Linux server, and it must be an SSH connection. (I think most of the time it's ssh now, telnet is obsolete and insecure.)
Why SSH is needed because SecureCRT transfers files are based on SFTP.
Once you have connected to the session, all you need to do is right-click on the session tab, select "Connect SFTP Session" and you are done.
As follows:
Tip 6: Powerful Button Bar
SecureCRT window integrates a special feature: button bar.
This button bar allows you to customize various buttons and assign certain functions to them.
For example, you want to execute a basic command every time you turn on your device.
You used to enter manually one by one, but now you can press a button, click it, and it's done.
Button content can include the output carriage return, space, or wait for a period of time.
Configuration method:
Click View-> Button Bar
A bar appears under the SecureCRT window. Right-click it and the option "New button" appears.
6.1 Send string function
First select the Send String function, then add what you want to send to the right side of the window.
For example I want to see Linux IP addresses, routes. We can define it as follows:
In the diagram above, I defined two commands:
IP address and IP route. The meaning of the\r \p is defined in the red box above, i.e. send carriage return and pause for one second.
Also, in the Label column we can name this button column Linux-Check.
When finished, click OK to save.
Back on the SecureCRT page, left-click this button to execute, as shown below:
6.2 Define menu functions
In addition to custom strings, the button bar can also define many menu functions for daily use, such as connecting a new host, recording sessions, etc.
Here I'm just showing how to make a button to record a session.
As shown below:
First, in the Function section, select "Menu Function".
Next, select the function you want from the drop-down menu on the right. In this case, I selected MENU_LOG_SESSION to record the session log.
Then give a name and click Save.
When you are done, left-click the new Log-Session button and a window will pop up telling you where to save the new log file, as shown above.
Tip 7: Automatic session login
In your daily work, you may need to do daily inspections of certain devices. Wouldn't it be convenient if we could set SecureCRT software to automatically connect certain sessions as soon as it is opened?
Yes, it's easy to do. The configuration method is as follows:
In Options-> Global Options-> General-> Default Sessions, you can select "Use automatic sessions" and add items that you want to connect automatically when the software starts.
As follows:
Tip 8: Common conversation, make a shortcut to put it on the desktop
There must be software icons on your desktop to launch software.
Similarly, can we make shortcuts to devices that often need to be connected to the desktop?
The answer is yes, as follows:
In SecureCRT's Session Management tab on the left, select the session you want to shortcut to and click the arrow in the upper right corner.
If the following figure shows:
Tip 9: Say goodbye to boring colors and make characters come alive
Tired of the monotony of color?
Would you like to output characters with special colors, such as IP addresses, numbers, etc.?
All you need to do is write a regular expression that matches a specific content and give it a color.
What's that? Do I have to write one myself, or is it a regular expression?
I knew you would react this way. For this reason, I specially found a ready-made configuration. The link is as follows:
https://forums.vandyke.com/attachment.php? attachmentid=1527&d=1524582386
The above connection contains a Cisco words.ini file, which you can download and put in this folder (take windows 10 as an example):
C:\Users\Your username\Documents\SecureCRT\Keywords.
When that's done, let's go back to SecureCRT to load this color configuration, as follows:
Select General-> Edit Default Settings in Options-> Global Properties. In the window that opens, select Terminal-> Appearance, and in the Keyword section, select Cisco Words. Finally select bold, color (color) can be customized if you need color, click edit can be modified according to their preferences.
As follows:
Tip 10: Bastion Host Jump
In some company networks, in order to ensure the safety of equipment network management, it is necessary to log in Bastion Host before logging in equipment, and then log in equipment from Bastion Host.
Often everyone's practice is to establish a session connection of the Bastion Host in SecureCRT to the Bastion Host, and then manually connect specific devices inside the Bastion Host.
In fact, SecureCRT has long thought of this problem. There is a function called "firewall" firewall, which is actually used to skip Bastion Host.
Demonstration case:
For example, I have a device called Jekyll-Server and a Bastion Host called EVE-NG-MGMT.
Demo topology:
My PC------EVE-NG-MGMT Bastion Host----Jekyll-Server.
My ultimate goal is to SSH login to Jekyll-Server. With SecureCRT's firewall function, this can be easily done as follows:
The above 10 tips, how many are you familiar with? Does it work for you? Please leave me a message!
Advertising time-Old driver network operation and maintenance dry goods collection
Promotion column, I did a network operation and maintenance column in 51cto.
Interested friends, don't miss it.
Through four typical technical modules: "Network Routing,""Network Switching,""Network Security," and "QoS," this column respectively tells you about network design ideas and some technical problems in operation and maintenance. I believe that after you read through each module, you will refresh your knowledge of certain knowledge.
The portal is as follows:
Old driver network operation and maintenance dry goods collection
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: 291
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.