Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client disclaimer #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fungalcofe
Copy link

Hi,

I added a small feature to display a custom message/disclaimer when a user creates a tmate session.
When server is start with a -d flag and an associated string, the disclaimer is display just after the note:.
If no disclaimer is declared no print will be done.

Note

Escape characters such as \n will be print in the disclaimer and won't produce a line feed.

e.g.

server:

$ nocorrect docker run --rm -v /tmp/tma:/root/ -p 2200:2200 -e SSH_KEYS_PATH=/root --cap-add=SYS_ADMIN antonin/tmate-ssh-server -d "    -> Hello and Welcome to tmate \! <-"
sh: out of range
sh: out of range
Loading key /root/ssh_host_ed25519_key
Accepting connections on :2200
[LtxQ...] Spawning daemon ip=172.17.0.1
[LtxQ...] tmate version=2.4.0, protocol=6
[LtxQ...] sysname=Linux machine=x86_64 release=5.4.111 version=#1-NixOS SMP Sat Apr 10 11:34:32 UTC 2021 nodename=rilakkuma

client:

Tip: if you wish to use tmate only for remote access, run: tmate -F                                                                [0/0]
To see the following messages again, run in a tmate session: tmate show-messages
Press <q> or <ctrl-c> to continue
---------------------------------------------------------------------
Connecting to localhost...
Note: clear your terminal before sharing readonly access
    -> Hello and Welcome to tmate ! <-
ssh session read only: ssh -p2200 ro-PVWBWbhUQMgrTsEKJyzzM3dXy@35dea2f45857
ssh session: ssh -p2200 LtxQZV98ybg2YVwAxftcFhpp8@35dea2f45857

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant