-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Language ssh-config #3450
Comments
Hi, i see you are using a lot textmate highlights so here is a good grammar with correct licence https://github.com/textmate/ssh-config.tmbundle Thanks |
I want to work on this issue , as a |
I don't have a repo, but here's an example of what I have locally in # quick handy copy paste
#PreferredAuthentications=password
#PubkeyAuthentication=no
# proxycommand with SOCKS5: https://www.cyberciti.biz/faq/linux-unix-ssh-proxycommand-passing-through-one-host-gateway-server/
# proxycommand: https://starkandwayne.com/blog/setting-up-an-ssh-tunnel-with-ssh-config/
# proxyjump: https://www.madboa.com/blog/2017/11/02/ssh-proxyjump/
# proxyjump: https://wiki.gentoo.org/wiki/SSH_jump_host
# bitbucket
Host bitbucket bitbucket.org
Hostname bitbucket.org
User git
IdentityFile ~/.ssh/bitbucket_rsa
IdentitiesOnly yes
# github
Host github github.com gist.github.com
Hostname github.com
User git
IdentityFile ~/.ssh/github_rsa
IdentitiesOnly yes
# gitlab
Host gitlab.com
Hostname gitlab.com
User git
IdentityFile ~/.ssh/gitlab_rsa
IdentitiesOnly yes
# local test gitlab
Host gitlab.local
Hostname gitlab.local
User git
Port 2222
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
# Router
Host 192.168.1.1 tomato
#Hostname tomato
Hostname 192.168.1.1
IdentityFile ~/.ssh/tomato_rsa
IdentitiesOnly yes
User root
KexAlgorithms +diffie-hellman-group1-sha1
# Some password only server example
Host 192.168.0.100 example
Hostname 192.168.0.100
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
User root
PreferredAuthentications=password
PubkeyAuthentication=no
# Example server
Host client-roomserver01
Hostname 255.255.255.255
User root
Port 22
IdentitiesOnly no
PreferredAuthentications=password
#ProxyCommand ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no client-proxy-server nc %h %p %r -e
#ProxyCommand ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no client-proxy-server nc %h %p
ProxyJump client-proxy-server
# Some vagrant box
Host client-vagrant
HostName 127.0.0.1
User vagrant
Port 2200
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/gableroux/somewhere/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
# Example ProxyCommand
Host client-roomserver02
Hostname 255.255.255.255
User root
Port 22
IdentitiesOnly no
PreferredAuthentications=password
ProxyCommand ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no client-proxy-server nc %h %p %r -e
ProxyCommand ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no client-proxy-server nc %h %p
#ProxyJump client-proxy-server edit: updated to use |
Here you go mate. I smashed together an SSH config you can use. The grammar repository is already added to Linguist ( @atakanyenel Go for it! 😉 |
#4429 has been merged, so we can now close this issue. You guys will start seeing highlighted SSH-configs on GitHub.com once the next release of Linguist has been cut. |
Backtick ShorthandWhat's the backtick shorthand for this? Will this work?
Testing...Hmm... let's see
Host my-nickname
Hostname my-nickname.example.com
User me
ResultLooks like |
Hi, I'm using ssh-config files (usually found in
~/.ssh/config
) I'd be happy to see syntax highlighting available on github for this. I did not take the time to see how this could be done yet. Sometimes I share ssh configs in wikis.https://github.com/github/linguist/blob/master/CONTRIBUTING.md#adding-a-language
There's a grammar available here:
https://github.com/lalyos/ssh-config/blob/master/grammars/ssh-config.cson
That would be awesome :)
Or let me know if it's already available and I did not see it 👍
The text was updated successfully, but these errors were encountered: