Problem with changing ios.rb
Good time.
Can you please advise.
I made changes to ios.rb
So that I have one more point hidden, but after applying it and restarting Docker, nothing changes for me.
After application, the line does not disappear anywhere. The password is there in clear text, I don’t want it to be visible. Please tell me what I need to do.
I can't do anything with this issue. Please:
- Use text and no screenshots
- Describe what the problem is
@robertcheramy I'm trying to change the "ios.rb" file in the / directory /root/oxidized/lib/oxidized/model By adding 1 more way to hide a password that is not specified in ios.rb
cmd :secret do |cfg|
cfg.gsub! /^(\s+path sftp:\/\/).*/, '\\1 <Path: removed>'
or I'm trying to change the comments in the files instead of secret hidden to something else and after restart docker compose nothing changes My path in cisco catalyst
path sftp://user:password@ip//upload/Catalyst-archive/C9k-IX-MSK-AG-SW/$h$t
still visible on the oxi web page
I save configurations using git
What needs to be done to hide my password on the web and write
path sftp://<Path: removed>
I accidentally closed
Can somebody help?
Launch irb, enter your config, and test the regexp until you get someting you like:
$ irb
irb(main):001:0" cfg = "hallo
irb(main):002:0" test
irb(main):003:0" path sftp://user:password@ip//upload/Catalyst-archive/C9k-IX-MSK-AG-SW/$h$t
irb(main):004:0" End of config
irb(main):005:0> "
=> "hallo\ntest\npath sftp://user:password@ip//upload/Catalyst-archive/C9k-IX-MSK-AG-SW/$h$t\nEnd of config\n"
irb(main):006:0> cfg.gsub! /^(\s+path sftp:\/\/).*/, '\\1 <Path: removed>'
=> nil
irb(main):007:0> cfg.gsub! /(path sftp:\/\/).*/, '\\1 <Path: removed>'
=> "hallo\ntest\npath sftp:// <Path: removed>\nEnd of config\n"