Avatar of Balbir Singh
Balbir Singh
Flag for United States of America asked on

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

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!
SSH / Telnet Software

Avatar of undefined
Last Comment
David Favor

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
skullnobrains

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
David Favor

As skullnobrains mentioned, just because you have config access to a value, doesn't mean the value is passed as a shell environment variable.

Maybe describe what exactly you're trying to see + someone can assist.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy