In case you want to explore the opportunity for performing private-public messaging in Linux , then ssh-chat is the perfect solution. This article will describe you how we can unlock private-public messaging in Linux using ssh-chat utility.
What is an ssh-chat utility:
ssh-chat is an open source utility that allows us to do private-public messaging in Linux or any other supported OS over ssh connection.
What is possible with ssh-chat:
- enables chatting in chat room over ssh prootocol.
- You can also to private messaging
- customization for different color themes
- ssh-chat supports white-listing/blocking users
- Can check any user’s public key fingerprint for identification purposes
- Supports listing down all the connected users
How to install ssh-chat utility for performing private-public messaging in Linux
Now follow below commands on the server which needs to configure as a chat server.
#tar -xvf ssh-chat-linux_amd64.tgz
Upon executing last command i.e. “./ssh-chat” you will get the port number on which system is listening for chat services as below:
In our case listening port is 2022.
Now to demonstrate private-public messaging in Linux we need to connect to our chat server over ssh protocol. You can use putty for the same. Lets take following three users for demonstration:
Connecting to chat room:
After connecting over a server using ssh follow below steps.
Now to connect with chat room we need to use listening port 2022 using below command for each user and you are type the message you want to share in the chat room.
[root@rhel1 ~]# ssh localhost -p 2022
[mann@rhel1 ~]$ ssh localhost -p 2022
[manmohan@rhel1 ~]$ ssh localhost -p 2022
How to List all the connected users:
Lets say you want to list down all the users connected to chat server , then use /names command:
-> 3 connected: manmohan, root, mann
How to send private message to other user:
Private messaging is also available in ssh-chat. Follow below procedure for the same. Lets say user mann want to send private message “Manmohan is crazy” to user root then:
[mann] /msg root Manmohan Is Crazy!!!
-> [Sent PM to root]
Then below message will be received by the root user.
[PM from mann] Manmohan Is Crazy!!!
How to check Users information:
In case you want to check the users information connected to server use below command.
[manmohan] /whois mann
-> name: mann
> fingerprint: (no public key)
> client: SSH-2.0-OpenSSH_6.6.1
> joined: 23 minutes ago
In case of help required try below “/help” command.
-> Available commands:
/exit - Exit the chat.
/ignore [USER] - Hide messages from USER, /unignore USER to stop hiding.
/msg USER MESSAGE - Send MESSAGE to USER.
/names - List users who are connected.
/nick NAME - Rename yourself.
/quiet - Silence room announcements.
/reply MESSAGE - Reply with MESSAGE to the previous private message.
/theme [colors|...] - Set your color theme.
/whois USER - Information about USER.