You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 9, 2018. It is now read-only.
Authy-ssh uses the `sshd_config` directive `ForceCommand` to run itself before every login. Here's how your sshd_config will look after installing:
@@ -71,11 +84,10 @@ Here's an example:
71
84
user=root:1:-1
72
85
user=daniel:1:300
73
86
74
-
In this case it means user root and daniel have two-factor enabled and that 1 is their `authy_id`. If a user is not in this list, `authy-ssh` will automatically let him in.
87
+
In this case it means user root and daniel have two-factor enabled and that 1 is their `authy_id`. If a user is not in this list, `authy-ssh` will automatically let him in.
75
88
The user daniel has an optional `grace-period` of 300 seconds, allowing them to open a new session within 5 minutes of the last successful login without requiring two-factor authentication.
76
89
On the other hand, the root user uses the default `grace-period` of -1, requiring all sessions to use two-factor authentication, regardless of recent successful logins.
77
90
78
-
79
91
The `load_default_banner` option will show the operating system's default SSH banner when a successful login occurs. This checks to see if a MOTD is set in /etc/pam.d/sshd or /etc/motd.
80
92
Setting this to disable will suppress the default sshd MOTD.
81
93
@@ -103,20 +115,9 @@ Now that my root user is in the two-factor group, I edit my /etc/ssh/sshd_config
103
115
Now force command will only operate on users that belong to the two-factor group.
104
116
105
117
106
-
## Enable two-factor auth on a user.
107
-
108
-
To enable users type the following command and fill the form:
## `scp`, `sftp`, `mosh` and `git push` with two-factor authentication.
115
119
116
-
117
-
## `scp`, `mosh` and `git push` with two-factor authentication.
118
-
119
-
To enable non-interactive commands like `scp`, `mosh` and `git clone|fetch|push` you have to allow to pass the environment variable `AUTHY_TOKEN` from the client. To do so edit your `sshd_config` (normally located at `/etc` or `/etc/ssh/`) and add `AUTHY_TOKEN` to the AcceptEnv directive:
120
+
To enable non-interactive commands like `scp`, `sftp`, `mosh` and `git clone|fetch|push` you have to allow to pass the environment variable `AUTHY_TOKEN` from the client. To do so edit your `sshd_config` (normally located at `/etc` or `/etc/ssh/`) and add `AUTHY_TOKEN` to the AcceptEnv directive:
120
121
121
122
AcceptEnv AUTHY_TOKEN
122
123
@@ -131,6 +132,9 @@ And finally pass the token before the command:
For cases like `sftp` if you enter an invalid token, you may receive a response like *"Received message too long 458961713"*. This is because the interactive command is not able to render the proper output text message returned by the program.
134
138
135
139
## Multiple users sharing the same unix account.
136
140
@@ -158,4 +162,10 @@ To uninstall type:
158
162
$ sudo authy-ssh uninstall
159
163
$ restart your SSH server
160
164
161
-
165
+
166
+
## Running Unit Tests
167
+
168
+
Fork and clone the git repository https://github.com/DigitalDJ/authy-ssh.git
0 commit comments