You do not need to have PermitRootLogin Yes The forced-commands-only option means that you can only run the commands specified by the matching record in your authorized_keys file. This is from one of mine:-
This means that you can keep Security happy, because you still prevent login with ssh as root.
I suppose another way would be to use NFS and mount the ServerB directory on ServerA. You then could copy the data much more easily, as though it were a local resource. Do you know how to do this? It's a bit like mapping a network disk in Microsoft terms. This might give you security concerns though, as the data will be available on ServerA (subject to permissions) and you need to be careful with ownership. The files/directories ownership are stored as the UID & GID numbers and that can vary between servers, e.g. a file owned by bob, UID 1024 on ServerB may appear to be owned by sue on ServerA if sue has UID 1024 on ServerA.
Not sure if either of these suggestions helps or causes more headaches.
I want to know how many directories and files are there in a directory and if the sub directory have any files i also need that also .
I have done this far .... (4 Replies)
Hello,
Using the instruction mget (within ftp) and with "Interactive mode off", I want to get all files from directory (DirAA), but not the files in sub-directories.
The files names don't follow any defined rule, so they can be just letters without (.) period
Directory structure example: ... (0 Replies)
So I am not sure if this should go in the shell forum or in the beginners. It is my first time posting on these forums.
I have a directory, main_dir lets say, with multiple sub directories (one_dir through onehundred_dir for example) and in each sub directory there is a test.txt. How would one... (2 Replies)
I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together.
I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 Replies)
i have a c-shell script.
and i pass it one or two arguments
the first argument is the directory
the second is the "-r"
now,
if i pass it only one, it searches the files ending in txt in that directory
if i pass it two parameters, like "temp" and "-r"
i want it to go through all the files and... (1 Reply)
Hey guys,
I need to know how to locate all .htaccess files on the server and make a backup of them in the folder they reside before I run a script to modify all of them.
So basically taking dir1/.htaccess and copying it as dir1/.htaccess_bk
dir2/.htaccess copying as dir2/.htaccess_bk... (5 Replies)
Hi,
I have around 400 directories each one named as hour_1/ , hour_2/ .....hour_400/ and each of these contains two files, namely:
File1: hour_1.txt (in hour_1/) , hour_2.txt (in hour_2/) ....hour_400.txt (in hour_400/) etc...
File2: client_list_hour_1.txt (in hour_1/),... (7 Replies)
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
Find all files in the current directory only excluding hidden directories and files.
For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided.
`find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Discussion started by: ksailesh1
7 Replies
LEARN ABOUT DEBIAN
login_duo
LOGIN_DUO(8) BSD System Manager's Manual LOGIN_DUO(8)NAME
login_duo -- second-factor authentication via Duo login service
SYNOPSIS
login_duo [-d] [-c file] [-h host] [-f user] [command [args...]]
DESCRIPTION
login_duo provides secondary authentication via the Duo authentication service, executing the user's login shell or command only if success-
ful.
The following options are available:
-c Specify an alternate configuration file to load. Default is /etc/duo/login_duo.conf
-d Debug mode; send logs to stderr instead of syslog.
-h Specify the remote IP address for this login (normally taken from the SSH_CONNECTION environment variable, if set).
-f Specify an alternate Duo user to authenticate as.
If login_duo is installed setuid root (the default), these options are only available to the super-user.
After successful Duo authentication, the user's login shell is invoked, or if an alternate command or SSH_ORIGINAL_COMMAND environment vari-
able is specified, it will be executed via the user's shell with a -c option.
CONFIGURATION
The INI-format configuration file must have a ``duo'' section with the following options:
host Duo API host (required).
ikey Duo integration key (required).
skey Duo secret key (required).
groups If specified, Duo authentication is required only for users whose primary group or supplementary group list matches one of the
space-separated pattern-lists (see PATTERNS below).
failmode On service or configuration errors that prevent Duo authentication, fail ``safe'' (allow access) or ``secure'' (deny access).
Default is ``safe''.
pushinfo Send command to be approved via Duo Push authentication. Default is ``no''.
An example configuration file:
[duo]
host = api-deadbeef.duosecurity.com
ikey = SI9F...53RI
skey = 4MjR...Q2NmRiM2Q1Y
pushinfo = yes
If installed setuid root (the default), login_duo performs Duo authentication as a dedicated privilege separation user, requiring that the
configuration file be owned and readable only by this user.
PATTERNS
A pattern consists of zero or more non-whitespace characters, '*' (a wildcard that matches zero or more characters), or '?' (a wildcard that
matches exactly one character).
A pattern-list is a comma-separated list of patterns. Patterns within pattern-lists may be negated by preceding them with an exclamation mark
('!'). For example, to specify Duo authentication for all users (except those that are also admins), and for guests:
groups = users,!wheel,!*admin guests
EXAMPLES
login_duo can be enabled system-wide by specifying its full path as a ForceCommand in sshd_config(5) to capture any SSH remote login (includ-
ing subsystems, remote commands, and interactive login):
ForceCommand /usr/local/sbin/login_duo
Similarly, a group of administrators could require two-factor authentication for login to a shared root account by specifying login_duo as
the forced command for each public key in ~root/.ssh/authorized_keys:
command="/usr/local/sbin/login_duo -f alice"
ssh-rsa AAAAB2...19Q== alice@example.net
command="/usr/local/sbin/login_duo -f bob"
ssh-dss AAAAC3...51R== bob@example.net
A user without root access could configure their own account to require Duo authentication via the same ~/.ssh/authorized_keys forced command
mechanism and a user-installed (non-setuid) login_duo.
FILES
/etc/duo/login_duo.conf
Default configuration file path
AUTHORS
login_duo was written by Duo Security <duo_unix@duosecurity.com>
NOTES
When used to protect remote SSH access, only interactive sessions support interactive Duo login. For scp(1), sftp(1), rsync(1), and other
ssh(1) remote commands, login_duo automatically tries the user's default out-of-band factor (smartphone push or voice callback) and disables
real-time login progress reporting to provide a clean shell environment.
BSD September 3, 2010 BSD