Skip to content

Commit

Permalink
example config UPDATE ssh listen config with all auth methods
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Jan 8, 2024
1 parent f3ccd33 commit d6e748e
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions example_configuration/ssh_listen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
<listen>
<endpoint>
<name>default-ssh</name>
<ssh>
<tcp-server-parameters>
<local-address>0.0.0.0</local-address>
<keepalives>
<idle-time>1</idle-time>
<max-probes>10</max-probes>
<probe-interval>5</probe-interval>
</keepalives>
</tcp-server-parameters>
<ssh-server-parameters>
<server-identity>
<host-key>
<name>default-key</name>
<public-key>
<keystore-reference>genkey</keystore-reference>
</public-key>
</host-key>
</server-identity>
<client-authentication>
<users>
<user>
<name>user</name> <!-- User name that can use this authorized key(s) to authenticate itself -->
<public-keys>
<use-system-keys xmlns="urn:cesnet:libnetconf2-netconf-server"/> <!-- Uses system authorized keys of the user automatically -->
<!-- Specific inline definition of an authorized key can be used INSTEAD of system authorized keys (select one method)
<inline-definition>
<public-key>
<name>my-authorized-key</name>
<public-key-format xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">ct:ssh-public-key-format</public-key-format>
<public-key>base64==</public-key> - Copy here one line (key) from the authorized_keys of the user
</public-key>
</inline-definition>
-->
</public-keys>
<!-- Use password authentication INSTEAD of public keys (select one method)
<password>pass</password> - Replace "pass" with the password of the user
-->

<!-- Use keyboard-interactive authentication INSTEAD of public keys (select one method)
<keyboard-interactive xmlns="urn:cesnet:libnetconf2-netconf-server">
<use-system-auth/> - Will use system mechanisms for authentication the user, usually asking for their password
</keyboard-interactive>
-->
</user>
</users>
</client-authentication>
</ssh-server-parameters>
</ssh>
</endpoint>
</listen>
</netconf-server>

0 comments on commit d6e748e

Please sign in to comment.