You are not logged in.

#1 2010-02-27 02:12:26

neofish
Member
Registered: 2010-02-13
Posts: 25

chatt'n over ssh

You know irc, google talk, msn.  Well, I discovered another way to chat, over ssh.  Me and another server admin talk to each other using this method, here's how to do it:

Find out what terminals the other users are using with the command 'who'

Send a message to them using 'write $user (their terminal)'

They can send a message back to you using the same command.


Enjoy!!

Offline

#2 2010-02-27 02:36:40

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: chatt'n over ssh

This is rather old news. the `write' program has been around for a while smile

Offline

#3 2010-02-27 02:39:18

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: chatt'n over ssh

Awesome man, i didn't know that.
I try it and works perfect.

Offline

#4 2010-02-27 03:24:03

neofish
Member
Registered: 2010-02-13
Posts: 25

Re: chatt'n over ssh

It's very old, but it's one of those things that people forget about.  I guess you could call it a 'secret' or a 'party trick'.  Anyway, alot of people have no idea you could do this, so I'll just tell everyone.

Offline

#5 2010-02-27 05:55:11

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: chatt'n over ssh

Everything old is new again.

Offline

#6 2010-02-27 06:20:10

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: chatt'n over ssh

There's also talk and talkd.

Offline

#7 2010-02-27 06:39:00

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: chatt'n over ssh

If there's only the 2 of you logged in, just use the 'wall' command... Literally just did that 5 minutes ago, lol

Last edited by fukawi2 (2010-02-27 06:39:11)

Offline

#8 2010-02-27 06:42:46

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: chatt'n over ssh

The write command has been around since the first UNIX systems wink


neutral

Offline

#9 2010-02-27 07:04:48

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: chatt'n over ssh

This is especially fun in i.e screen sessions running irssi or whatever curses application.

Offline

#10 2010-02-27 08:36:44

3])
Member
From: Netherlands
Registered: 2009-10-12
Posts: 215

Re: chatt'n over ssh

Gives another meaning to "secure" chatting.
But then ofcourse, port 22 is open...


“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”-- C.A.R. Hoare

Offline

#11 2010-02-27 08:37:46

Bralkein
Member
Registered: 2004-10-26
Posts: 354

Re: chatt'n over ssh

echo "Hello!" > /dev/pts/1

That sort of thing can work too, permissions allowing. A bit more intriguing IMO smile

PS. On my machine pts/0 seems to be the KDE system tray notification channel. Using "write" with that is quite amusing!

Last edited by Bralkein (2010-02-27 08:40:37)

Offline

#12 2010-02-27 08:40:05

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: chatt'n over ssh

Bralkein wrote:

echo "Hello!" > /dev/pts/1

That sort of thing can work too, permissions allowing. A bit more intriguing IMO smile

fukawi2 wrote:

If there's only the 2 of you logged in, just use the 'wall' command... Literally just did that 5 minutes ago, lol

The wall manpage leads to the mesg command which enables you to set write permissions to the terminal you're currently using.

Last edited by Runiq (2010-02-27 08:40:22)

Offline

#13 2010-02-27 08:43:02

Bralkein
Member
Registered: 2004-10-26
Posts: 354

Re: chatt'n over ssh

Yes, interestingly if you do "mesg n" then you can't write to yourself, but you can still do the trick with echo.

Offline

#14 2010-02-27 08:46:30

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: chatt'n over ssh

Bralkein wrote:

Yes, interestingly if you do "mesg n" then you can't write to yourself, but you can still do the trick with echo.

Good to know, thanks!

*sneaks off to harass some co-workers*

Offline

#15 2010-02-27 09:28:43

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: chatt'n over ssh

Bralkein wrote:

echo "Hello!" > /dev/pts/1

echo 'bye bye' > /dev/pts/* is more fun

Offline

#16 2010-02-27 14:00:58

Bralkein
Member
Registered: 2004-10-26
Posts: 354

Re: chatt'n over ssh

If it's fun you're after...

while :; do dd if=/dev/urandom count=1000 > /dev/pts/*; done

(warning: the above might not be a good idea)

Edit: Before anyone asks, that only works in zsh, in bash it says "ambiguous redirect" so you need an inner for loop. Or so I believe.

Last edited by Bralkein (2010-02-27 14:03:31)

Offline

#17 2010-02-27 15:14:05

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: chatt'n over ssh

3]) wrote:

Gives another meaning to "secure" chatting.
But then ofcourse, port 22 is open...

Port 22 is open only the people you want it to be open, there are many ways to grant (or deny) access.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#18 2010-03-02 04:03:19

gaunt
Member
Registered: 2009-12-13
Posts: 62

Re: chatt'n over ssh

Bralkein wrote:

If it's fun you're after...

while :; do dd if=/dev/urandom count=1000 > /dev/pts/*; done

(warning: the above might not be a good idea)

Edit: Before anyone asks, that only works in zsh, in bash it says "ambiguous redirect" so you need an inner for loop. Or so I believe.

This works quite well...

for x in `ls /dev/pts/` ; do dd if=/dev/urandom count=1000 > /dev/pts/$x; done;

Or, for synchronity,


for y in `seq 1 1000` ; do for x in `ls /dev/pts/` ; do dd if=/dev/urandom count=1 > /dev/pts/$x; done; done;

(Now that one takes a long time to run, might wanna chuck a &>/dev/null & at the end wink )

Last edited by gaunt (2010-03-02 04:07:53)

Offline

#19 2010-03-02 06:16:54

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: chatt'n over ssh

You could also do this using an SSH tunnel.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB