Locked out of ssh and sftp


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Locked out of ssh and sftp
# 1  
Old 10-05-2009
Locked out of ssh and sftp

I've been having troubles where i get locked out of shh and sftp. It happens overnight and when i come in the next day i have been locked out and can't seem to log in to the server through ssh or sftp. It is a co location server and each day i am having to have the hosts restart my server. When they do i can log in to sftp and ssh for the remainder of day. The funny thing is all other services seem to be working on the server even when i am locked out. E.g . The webserver (apache/php) is still live luckily. I can ping the machine also.

I have looked at the crashreporter.log file and there is no entries reporting any program crashes. I have looked at the system log and each day for the past week i have 1000s of authentication attempts via ssh and other services from a variety different IPs. The IPs that are trying to authenticate are from various different countries. What should I do do you think this kind of forced log in attempts could stop ssh and sftp from allowing log ins for a period of time. If not where should i look?
# 2  
Old 10-05-2009
If these log in attempts are not from machines that should be SSH'ing to this host then you could do several things:
1. Change from the default port of 22 to something different (port line in sshd_config on the server and port line in ssh_config on client machine).

2. Configure a firewall on the webserver to only allow SSH from your client(s), remembering to specify the alternate port number if you have also adopted suggestion1. If you do setup a firewall then it will need to allow HTTP in as well of course!
# 3  
Old 10-06-2009
Thanks I'm trying to get a hardware firewall implemented. I found that the log gave this report moments before a crash

Quote:
[
[Time 2009.10.05 14:45:52 UTC] [Facility user] [Sender servermgrd] [PID -1] [Message servermgr_dns: no name available via DNS for 86.54.98.194] [Level 3] [UID -2] [GID -2] [Host DomainwiseWeb2]
[Time 2009.10.05 14:45:52 UTC] [Facility user] [Sender servermgrd] [PID -1] [Message servermgr_dns: no hostname set and unable to detect via DNS, services may not function properly - use changeip to repair] [Level 3] [UID -2] [GID -2] [Host DomainwiseWeb2]
[Time 2009.10.05 14:45:53 UTC] [Facility user] [Sender servermgrd] [PID -1] [Message Vsize has grown to 49M. Exiting to clear memory leak.] [Level 2] [UID -2] [GID -2] [Host DomainwiseWeb2]
[Time 2009.10.05 14:45:53 UTC] [Facility launchd] [Sender launchd] [PID -1] [Message com.apple.servermgrd: exited with exit code: 12] [Level 4] [UID -2] [GID -2] [Host DomainwiseWeb2]
[Time 2009.10.05 14:45:53 UTC] [Facility launchd] [Sender launchd] [PID -1] [Message com.apple.servermgrd: 9 more failures without living at least 60 seconds will cause job removal] [Level 4] [UID -2] [GID -2] [Host DomainwiseWeb2]
[Time 2009.10.05 14:45:53 UTC] [Facility user] [Sender servermgrd] [PID -1] [Message servermgr_dns: no name available via DNS for 86.54.98.194] [Level 3] [UID -2] [GID -2] [Host DomainwiseWeb2]
[Time 2009.10.05 14:45:53 UTC] [Facility user] [Sender servermgrd] [PID -1] [Message servermgr_dns: no hostname set and unable to detect via DNS, services may not function properly - use changeip to repair] [Level 3] [UID -2] [GID -2] [Host DomainwiseWeb2]
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Login getting locked on sftp

Hey All, I have a ascript which sftp files from Solaris to Windows. I am usgin expect and sending password though script. I have observed that sometimes script works fine (manually or in cron) but after some run, the user I am usgin to connect is getting locked on Domain level. I am... (6 Replies)
Discussion started by: Deei
6 Replies

2. Shell Programming and Scripting

ssh/sftp connection refused

Hi all, I logged on to a Unix server and am trying to connect a remote Windows server (Windows NT) via SSH/SFTP. However I always got the following error, sftp username@host_server (or ssh username@host_server) ssh: connect to host host_server port 22: Connection refused Any advise... (1 Reply)
Discussion started by: isaacniu
1 Replies

3. Shell Programming and Scripting

sftp ssh-keygen

sftp username@host <<EOF lcd /home/dirA cd /home/dirB mput *.txt exit EOF Hi, i have done the keygen-ssh settings but rite now I log through putty I enter my credentials and then when i successfully log in, then I issue the command ssh server name then I again enter into the server but... (1 Reply)
Discussion started by: rahulsxn660
1 Replies

4. Solaris

SSH & SFTP Chroot

Hello all, does anybody knows a procedure to enable an chroot for users using ssh and sftp ? Thanks (1 Reply)
Discussion started by: celord
1 Replies

5. Solaris

SFTP from SSH2 to SSH

Hi, Earlier, I have configured SFTP successfully in my prev jobs. This time I have to configure SFTP for local server (uses SSH2) and remote server (uses SSH). I tried to search the forum. I did not find the right thread. I appreciate your help. The following is the additional info >... (5 Replies)
Discussion started by: bobbygsk
5 Replies

6. Shell Programming and Scripting

Password less connection(sftp/ssh)

Dear All, I'm trying to configure a passwordless connection between two servers of HP-UX. i have srearched the configuration in google so many times and as per the guidence i have done all the steps, but still its not working and every time it is asking for password while trying to scp some file... (2 Replies)
Discussion started by: panknil
2 Replies

7. SuSE

SFTP with Suse 9.3 need help with Update ssh

Hi eryone, I'm new here. Since I'm a graphic designer and not an admin, I need to learn a lot from the first step, so please be patient with me. ;-) Most of my skills are self taught with howtos, so there might be some lack of wisdom in basics. I've setup a Suse-System (9.3) with a few upload... (3 Replies)
Discussion started by: rezent
3 Replies

8. Shell Programming and Scripting

SSH and SFTP

remotePath=$1 fileName=$2 remoteUser=$3 remoteServer=$4 echo " if ; then echo '0'; else echo '1'; fi " > temp_command.log command1=`cat temp_command.log` ssh $remoteUser@$remoteServer $command1 rm temp_command.log Above code is to check whether the file in remote server is exist. It... (1 Reply)
Discussion started by: suigion
1 Replies

9. UNIX for Advanced & Expert Users

ssh/sftp failure connection

Hello, I just want to ask regarding the meaning of the error that we got using sftp: Connecting to <TARGET SERVER IP>... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @... (3 Replies)
Discussion started by: james_falco
3 Replies

10. AIX

SFTP Issue with ssh

Hello all, hopefuly this is the right place to post this. I am having an issue with a new sftp process on an AIX box. I created id_rsa.pub file and sent it to the person who runs the sftp process. He added the key to the authorized_Users (I only have phone contact with him and its an outside... (7 Replies)
Discussion started by: dbridle
7 Replies
Login or Register to Ask a Question