Skip to content
Discussion options

You must be logged in to vote

Using the "custom links" feature, you can add URLs to anything, including SSH, as long as the client operating system can interpret these links. I’ve included an SSH link in my NetBox instance using this definition.

Link text:

{% if 
      object.status == 'active'
  and (object.oob_ip or object.primary_ip)
%}
<div class="d-inline mdi mdi-console-line"></div>
SSH Console
{% endif %}

Link URL:

{% set ip = object.oob_ip | default(object.primary_ip, true) %}
ssh://{{ ip.address.ip }}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kaiwangsim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants