5
votes
1answer
71 views

Linux: $SSH_CONNECTION is set even without SSHing to the server

I have a remote server and I am writing a script in the server and want it to fire only when I SSH. I thought of using the $SSH_CONNECTION and $SSH_TTY for this purpose. I found out that when I have ...
1
vote
2answers
307 views

MaxStartups and MaxSessions configurations parameter for ssh connections?

I am copying the files from machineB and machineC into machineA as I am running my below shell script on machineA. If the files is not there in machineB then it should be there in machineC for sure ...
2
votes
1answer
61 views

Is there a way to run a privileged command upon successful SSH login (not necessarily with shell or PTY)?

I'd like to run a privileged command upon successful SSH logins at the server's end. However, this has to be in the server configuration (sshd_config or anything else that cannot be manipulated or ...
3
votes
0answers
43 views

Are there any canned solutions for running sshd in the initrd?

This is mostly aimed at Debian/Ubuntu, but I feel savvy enough on a variety of distros to be able to adapt the solution for one distro to another. Here's my scenario. There are a few situations when ...
0
votes
1answer
102 views

Separate SSHD Authpriv logs into /var/log/sshd, all other authpriv logging goes to messages

Right now, sshd is using the authpriv facility. The level of logging is fine, but I don't want it in the syslog, I want it to go to /var/log/sshd (which doesn't yet exist) on Red Hat Linux/Enterprise ...
4
votes
2answers
536 views

How to Provide login delay in ssh

I wanted to provide login delay while login through ssh .I tried couple of ways of doing same but couldn't find desired result. I tried steps provided by given link. ...
0
votes
3answers
408 views

What are the commands to apply changes made to /etc/ssh/sshd_config?

I have made some changes to /etc/ssh/sshd file and wanted these effects should take place. I know I can run below command for the effects to take place. /etc/init.d/sshd reload But on my box I ...
2
votes
1answer
236 views

How to terminate an interactive ssh session after certain amount of time

In my /etc/ssh/sshd_config file I have set the below parameters: ClientAliveInterval 10 ClientAliveCountMax 3 Now from host machine I did ssh to the my server (where I made changes to ...
0
votes
2answers
815 views

SSH client authentication as non root user

On my system ssh client authentication was allowed for root, but I wanted ssh client authentication to be allowed only for non root users. To disable ssh as root, I changed the PermitRootLogin yes to ...
5
votes
5answers
575 views

How to setup password-less ssh with RSA keys

I am trying to setup a password-less SSH configuration between two machines and am having trouble. There are a ton of howtos out there that I have followed and have had no success. Here are ...
1
vote
2answers
4k views

Change default path for when I SSH in to CentOS server?

I have a CentOS 5.7 web server, and I want to change the default place I land in when connecting using SSH. Currently I land in /home/username, and I want to land in /home instead. I've gone in as ...
3
votes
3answers
422 views

How to install openssh in Crux Linux

In Crux Linux I already have installed SSH but when I use ssh-keygen, and try to use the command: ssh localhost to test SSH I get this error: # ssh localhost ssh: connect to host localhost port ...
3
votes
4answers
216 views

Internet SSH Server Security Considerations

What steps should I take to reasonably secure my linux desktop before opening sshd to the Internet so I can connect from anywhere?