直接通过ssh进行聊天也是牛逼坏了,其实手机电脑,不管是window还是linux都可以使用这个的。
首先我们可以自己创建一个聊天室的服务器,分享给朋友玩,这样大家所有人都可以链接这一个服务器聊天了。
当然也有公共的服务器,里面的人你就没法控制了,乱七八糟一堆人,就比较难受
1.购买一个服务器:要求不搞,见谅捡便宜的买,我用的是小狗云
2.链接服务器
3.运行下发方代码即可自动部署
git clone https://github.com/quackduck/devzat && cd devzat
go install # or build, if you want to keep things pwd
ssh-keygen -qN '' -f devzat-sshkey # new ssh host key for the server
devzat # run! the default config is used & written automatically
如果最后一部运行不了
那么先通过go env GOPATH
语句查看来查看当前的 GOPATH
。
之后直接运行$GOPATH/bin/devzat,即可运行。注意要把$GOPATH改为上面获取的路径
如果你想在后台运行,可以参考这行代码
tmux new-session -s devzat-session -d '/root/go/bin/devzat'
我们来试试看。功能非常多,大家可以自己尝试看看
上面代码需要go语言环境,很多小伙伴都不太会安装go语言。建议大家直接购买小狗云自营服务器,
重装ubtu自带go语言环境的系统即可
想要连接你的聊天室其实很简单,直接运行下面的链接在你的命令行就行了
下面是我已经布置好的演示地址,第一个是官方的,第二个是我的
ssh devzat.hackclub.com
ssh ssh.bigyang.xyz -p 8080
如果链接不上就用下面这个代码再试试
ssh devzat.hackclub.com -p 443
如果你是window系统
只需要快捷键window+r,点出命令框输入cmd打开即可点出命令窗口
这是是开源的原文,只不过有些人不懂翻墙,我就直接粘贴过来了。自行研究吧,英文版本的
Where are the devs at? Devzat!
Devzat is a custom SSH server that takes you to a chat instead of a shell prompt. Because there’s SSH apps on all platforms (even on phones) you can connect to Devzat on any device!
Usage
Try it out:
ssh devzat.hackclub.com
If it’s your first time logging in, you can choose your display name with the SSH username. For example, if you want to be called “wenjie”, you can run:
ssh wenjie@devzat.hackclub.com
If you want to change your display name after the first login, you should use the nick
command.
If you’re under a firewall, you can still join on port 443:
ssh devzat.hackclub.com -p 443
If you add this to ~/.ssh/config
:
Host chat
HostName devzat.hackclub.com
You’ll be able to join with just:
ssh chat
We also have a Slack bridge! If you’re on the Hack Club Slack, check out the #ssh-chat-bridge
channel!
Feel free to make a new issue if something doesn’t work.
See the status site of the main Devzat server to check if it might be down.
Want to host your own instance?
Quick start:
git clone https://github.com/quackduck/devzat && cd devzat go install # or build, if you want to keep things pwd ssh-keygen -qN '' -f devzat-sshkey # new ssh host key for the server devzat # run! the default config is used & written automatically
These commands download, build, setup and run a Devzat server listening on port 2221, the default port (change by setting $PORT
).
Check out the Admin’s Manual for complete self-host documentation!
Permission denied?
Devzat uses public keys to identify users. If you are denied access: foo@devzat.hackclub.com: Permission denied (publickey)
try logging in on port 443, which does not require a key, using ssh devzat.hackclub.com -p 443
.
This error may happen because you do not have an SSH key pair. Generate one with the command ssh-keygen
if this is the case. (you can usually check if you have a key pair by making sure a file of this form: ~/.ssh/id_*
exists)
Help
Welcome to Devzat! Devzat is chat over SSH: github.com/quackduck/devzat
Because there's SSH apps on all platforms, even on mobile, you can join from anywhere.
Run `cmds` to see a list of commands.
Interesting features:
• Rooms! Run cd to see all rooms and use cd #foo to join a new room.
• Markdown support! Tables, headers, italics and everything. Just use \n in place of newlines.
• Code syntax highlighting. Use Markdown fences to send code. Run eg-code to see an example.
• Direct messages! Send a quick DM using =user <msg> or stay in DMs by running cd @user.
• Timezone support, use tz Continent/City to set your timezone.
• Built in Tic Tac Toe and Hangman! Run tic or hang <word> to start new games.
• Emoji replacements! :rocket: => 🚀 (like on Slack and Discord)
For replacing newlines, I often use bulkseotools.com/add-remove-line-breaks.php.
Made by Ishan Goel with feature ideas from friends.
Thanks to Caleb Denio for lending his server!
Commands
Commands
=<user> <msg> DM <user> with <msg>
users List users
color <color> Change your name's color
exit Leave the chat
help Show help
man <cmd> Get help for a specific command
emojis See a list of emojis
bell on|off|all ANSI bell on pings (on), never (off) or for every message (all)
clear Clear the screen
hang <char|word> Play hangman
tic <cell num> Play tic tac toe!
devmonk Test your typing speed
cd #room|user Join #room, DM user or run cd to see a list
tz <zone> [24h] Set your IANA timezone (like tz Asia/Dubai) and optionally set 24h
nick <name> Change your username
pronouns @user|pronouns Set your pronouns or get another user's
theme <theme>|list Change the syntax highlighting theme
rest Uncommon commands list
cmds Show this message
The rest
people See info about nice people who joined
id <user> Get a unique ID for a user (hashed key)
admins Print the ID (hashed key) for all admins
eg-code [big] Example syntax-highlighted code
lsbans List banned IDs
ban <user> Ban <user> (admin)
unban <IP|ID> [dur] Unban a person and optionally, for a duration (admin)
kick <user> Kick <user> (admin)
art Show some panda art
pwd Show your current room
shrug ¯\_(ツ)_/¯
Integrations
When self-hosting an instance, Devzat can integrate with Slack and/or Discord to bridge messages, and Twitter to post new-user announcements. See the Admin’s Manual for more info.
Devzat has a plugin API you can use to integrate your own services: documentation. Feel free to add a plugin to the main instance. Just ask for a token on the server.
暂无评论内容