Start a new topic
Implemented

Coloring of syntax in SSH sessions

Dear,


it would be very helpfull if you could make it so that certain words in SSH session get a color.

It would also be nice if you could choose those words and colors freely or use a template such as 'Cisco network devices' or 'Linux distributions'.


Your competitors such as MobaXterm and Devolutions already have this possibility.


Thanks and keep up the good work!


5 people like this idea

 I had the v5 beta for a time and didn't see any keyword highlighting available. Did it not make it into this beta?

Can I have an update on this, please?

I'm sorry for the confusion. The text highlighting configuration is in the current beta. Go to the Colors page and select the tab Text Highlighting.


Totally forgot, that I moved the configuration to the Colors page ;) Sorry about that...


Regards,
Stefan

It looks like these are only available for Rebex connections? Is there nothing for Putty based connections? We have well over 100 putty based connections, if Rebex is the only way, is there a way to bulk change our existing connections?

Hi Adam,


you are right, this is only available for Rebex based connections. The reason we cannot support that for PuTTY based connection is simply because PuTTY does not support that feature. The way PuTTY is integrated is very simple and we actually just start PuTTY.exe. If PuTTY implements this feature and we can control is by writing the configuration to the registry as we do with all the other PuTTY settings, we can also enable this for PuTTY.


Switching your existing connections from PuTTY to Rebex in bulk is quite simple. Check out this short videos on how to use the dashboard and the bulk-edit feature:

https://www.royalapplications.com/go/kb-ts-win-folderdashboard
https://www.royalapplications.com/go/kb-ts-win-bulkedit


For new objects, use the Aplication -> Default Sertings folder to setup all the default values.

Let me know if this helps.


Regards,
Stefan


1 person likes this

Thanks Stefan,

This is great info, but it doesn't seem to allow me to change it to Rebex. When I bulk edit I am only allowed to change the terminal type within putty. For instance, I can change them to telnet or serial, but they're still putty based.


Am I missing something?


Thanks,

Adam

Hi Adam,


you first need to go to the "Plugin" page in the properties and change the active plugin to "Rebex". After that you need to re-open the bulk-edit dialog. Let me know if this helps.


Regards,
Stefan


1 person likes this

how do I create Regular Expressions in order make case insensitive syntax coloring?

The 'i' flag in regex matches all cases.


For instance;

(?i)down

Matches DOWN, Down and down (or DoWn if your devices are weird...)


Here are the ones I have setup currently that work for me:


# Matches IP addresses

\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b

#55FFFF

#000000

 

# Matches any case of the word 'down'

(?i)down

#FFFF55

#000000

 

# Matches any case of a word that starts with vlan. (vlan, VLANS, etc.)

(?i)vlan(\w+)|vlan

#5555FF

#000000

 

# Matches any case of a word that starts with fail. (fail, Failure, etc.)

(?i)fail(\w+)|fail

#FF5555

#000000

 

# Matches any case of a word that starts with warn. (warn, WARNING, etc.)

(?i)warn(\w+)|warn

#FFC000

#000000

I should clarify; when you pipe a word that's an or.


So strictly speaking in the last three I put up there the pattern before the pipe matches anything with starting with the word that has something else after it, and after the pipe it matches the word itself.


I'm sure there's a more elegant way to do it but I'm not an expert in regex...


1 person likes this
Thank you, Adam.

I tried all of the syntaxes in:
https://stackoverflow.com/questions/9655164/regex-ignore-case-sensitivity
I also tried to use regexr.com for creating the syntaxes but none of them worked.
Also, is there a better way of doing:
(?i)err(\w+)|err|(?i)disable(\w+)|disable|(?i)fail(\w+)|fail

I think you can take out all but the first (?i) if you use that as a single string.


Something like:


(?i)err(\w+)|err|disable(\w+)|disable|fail(\w+)|fail


Definitely not more elegant, but a bit shorter and should be functional? I would need to test it out.

Actually, I think this might be better:


(?i)disable(\w*)|fail(\w*)

This should cover all iterations with the words in them. I'm struggling with 'err' though.


(?im)^err(\w*)

This should cover everything that begins with "err" case insensitive. However, it isn't working in RTS for me.


You could use:

(?i)err(\w*)


or have a single line:

(?i)disable(\w*)|fail(\w*)|err(\w*)


But this will catch anything with err in the string.

It will catch "err", "error" but will also catch "overruns" because it has "err" in it. So it will catch anything with "err" anywhere in the word.


Not sure how Royal implemented regex, but I haven't been able to figure out how to do start string matches yet.


Alright, I got a new one...it's more complected but also includes more options.  I grabbed the major sytax from another vendor, but it seems to work with RTS:


(¨( *)?no | down |[^A-Za-z0-9](disabl(\w*)|fault|shutdown|disconnected|err(\w*)|ERR(\w*)|fail(\w*)|denied|not permitted|disallowed|not allowed|refused|problem|not permitted|notconnect)[^A-Za-z0-9])


You can take out or add anything between the first set of parentheses after the "[^A-Za-z0-9]".


The first "| down |" only matches the string "down" with a space before and after. You can exclude that entirely if you want.

Login or Signup to post a comment