This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
if [[ $# -ne 1 ]] || [[ "$1" == '--help' ]]; then | |
cat >&2 <<'EOF' | |
Insert the following before a key in .ssh/authorized_keys: | |
command=".ssh/remember_command ID",no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc,no-pty | |
(On newer systems you can replace all these no-* options with single "restrict".) | |
Put this script into your ~/.ssh/ directory and make it executable. | |
It will remember the first requested command for the specified ID, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The Windows user friendly .bashrc™ | |
# (c) 2013-2014 nilsding | |
# License: public domain | |
# Feel free to fuck around with this. | |
# Test for an interactive shell. | |
if [[ $- != *i* ]] ; then | |
# Shell is non-interactive. Be done now! | |
return | |
fi |