So when I login to my local account, it loads ssh-agent which adds my keys (asking once for my passwords). Further simultaneous logins do not get asked.
If my shell sessions are hard-killed for some reason, that might leave ssh-agent hanging, so I added this to my own (not root's!) crontab:
...which means in the morning, I login and ssh-agent loads my keys for the duration of the workday, and I can 'ssh -t servername exec sudo bash' to get passwordless root prompts if I really need to.
At the end of the day, the last logout kills ssh-agent automatically. And if it should happen to be missed because of a hard-kill or other problem, it will be killed automatically at 1am.
Last edited by Corona688; 07-11-2013 at 03:54 PM..
All,
I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
We have SCO 5.0.5 and can't log into system as "root". The system indicates the password is incorrect. No one knows what happened.
How can we resolve this issue.. Are there files we can restore from backup...?
Any suggestions would be appreciated.
Thank you.. (2 Replies)
Hi,
The security auditor give a this statement , what to do ?
On my solaris system (S10)
"The User ID "root" should not be used on the system - the su and
the priviledged account should be used from each administrator for
accountability purposes"
What to do ? (3 Replies)
Hello
I have a question.
I have a box with Aix 5.3 but I want to disable root access direct from any terminal or console. I mean If I want to login to 10.10.10.10
login:root
password *********
Root access is not permited
Which file I have to edit. to the users first login with... (4 Replies)
I have set up RSA private and pub keys between "NodeA" and "NodeB"
Everything works fine when I test with a regular user account. However it does not work as root. I followed the same procedure to set up the keys as the root user but I am still prompted for a password. I have verified my... (1 Reply)
hi
i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help
Thanks (5 Replies)
Hi All
After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Currently in my system Red Hat is installed. And Many user connect to my machine via SSH Techia Terminal.
I want to give some users a root level access.
Can anyone please help me how to make it possible. I too searched on the Google but didn't find the correct way
Regards
ADI (4 Replies)
We are having a little problem on a server. We want that some users should be able to do e.g. sudo and become root, but with the restriction that the user can't change root password. That is, a guarantee that we still can login to that server and become root no matter of what the other users will... (2 Replies)
Discussion started by: 244an
2 Replies
LEARN ABOUT REDHAT
ssh-agent
SSH-AGENT(1) BSD General Commands Manual SSH-AGENT(1)NAME
ssh-agent -- authentication agent
SYNOPSIS
ssh-agent [-a bind_address] [-c | -s] [-d] [command [args ...]]
ssh-agent [-c | -s] -k
DESCRIPTION
ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA). The idea is that ssh-agent is started in the
beginning of an X-session or a login session, and all other windows or programs are started as clients to the ssh-agent program. Through use
of environment variables the agent can be located and automatically used for authentication when logging in to other machines using ssh(1).
The options are as follows:
-a bind_address
Bind the agent to the unix-domain socket bind_address. The default is /tmp/ssh-XXXXXXXX/agent.<ppid>.
-c Generate C-shell commands on stdout. This is the default if SHELL looks like it's a csh style of shell.
-s Generate Bourne shell commands on stdout. This is the default if SHELL does not look like it's a csh style of shell.
-k Kill the current agent (given by the SSH_AGENT_PID environment variable).
-d Debug mode. When this option is specified ssh-agent will not fork.
If a commandline is given, this is executed as a subprocess of the agent. When the command dies, so does the agent.
The agent initially does not have any private keys. Keys are added using ssh-add(1). When executed without arguments, ssh-add(1) adds the
files $HOME/.ssh/id_rsa, $HOME/.ssh/id_dsa and $HOME/.ssh/identity. If the identity has a passphrase, ssh-add(1) asks for the passphrase
(using a small X11 application if running under X11, or from the terminal if running without X). It then sends the identity to the agent.
Several identities can be stored in the agent; the agent can automatically use any of these identities. ssh-add -l displays the identities
currently held by the agent.
The idea is that the agent is run in the user's local PC, laptop, or terminal. Authentication data need not be stored on any other machine,
and authentication passphrases never go over the network. However, the connection to the agent is forwarded over SSH remote logins, and the
user can thus use the privileges given by the identities anywhere in the network in a secure way.
There are two main ways to get an agent setup: Either the agent starts a new subcommand into which some environment variables are exported,
or the agent prints the needed shell commands (either sh(1) or csh(1) syntax can be generated) which can be evalled in the calling shell.
Later ssh(1) looks at these variables and uses them to establish a connection to the agent.
The agent will never send a private key over its request channel. Instead, operations that require a private key will be performed by the
agent, and the result will be returned to the requester. This way, private keys are not exposed to clients using the agent.
A unix-domain socket is created and the name of this socket is stored in the SSH_AUTH_SOCK environment variable. The socket is made accessi-
ble only to the current user. This method is easily abused by root or another instance of the same user.
The SSH_AGENT_PID environment variable holds the agent's process ID.
The agent exits automatically when the command given on the command line terminates.
FILES
$HOME/.ssh/identity
Contains the protocol version 1 RSA authentication identity of the user.
$HOME/.ssh/id_dsa
Contains the protocol version 2 DSA authentication identity of the user.
$HOME/.ssh/id_rsa
Contains the protocol version 2 RSA authentication identity of the user.
/tmp/ssh-XXXXXXXX/agent.<ppid>
Unix-domain sockets used to contain the connection to the authentication agent. These sockets should only be readable by the owner.
The sockets should get automatically removed when the agent exits.
AUTHORS
OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
SEE ALSO ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)BSD September 25, 1999 BSD