We help IT Professionals succeed at work.
Get Started

How can we show the TOKEN value while sshing to a remote server?

Balbir Singh
Balbir Singh asked
on
92 Views
Last Modified: 2020-01-18
How can we show the TOKEN value while sshing to a remote server?

from the man page of sshd_config I see belows:
TOKENS
     Arguments to some keywords can make use of tokens, which are expanded at runtime:

           %%    A literal `%'.
           %D    The routing domain in which the incoming connection was received.
           %F    The fingerprint of the CA key.
           %f    The fingerprint of the key or certificate.
           %h    The home directory of the user.
           %i    The key ID in the certificate.
           %K    The base64-encoded CA key.
           %k    The base64-encoded key or certificate for authentication.
           %s    The serial number of the certificate.
           %T    The type of the CA key.
           %t    The key or certificate type.
           %U    The numeric user ID of the target user.
           %u    The username.

Open in new window


and from the man page of ssh_config I find belows:

TOKENS
     Arguments to some keywords can make use of tokens, which are expanded at runtime:

           %%    A literal `%'.
           %C    Hash of %l%h%p%r.
           %d    Local user's home directory.
           %h    The remote hostname.
           %i    The local user ID.
           %L    The local hostname.
           %l    The local hostname, including the domain name.
           %n    The original remote hostname, as given on the command line.
           %p    The remote port.
           %r    The remote username.
           %T    The local tun(4) or tap(4) network interface assigned if tunnel forwarding was requested, or "NONE" otherwise.
           %u    The local username.

Open in new window


Basically I want them to expand to some echo command so that I can see what is the current value when I ssh to a box, both from the client side and server side. I would really appreciate if someone can direct on how to achive it.

Best Regards!
Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE