The most recent thing I remember is changing the soft and hard memlock ulimit to unlimited. Now I can't ssh into the machine.This is the ssh log.Authenticated to IP ([IP]:22).debug1: channel 0: new [client-session]debug2: channel 0: send opendebug1: Requesting no-more-sessions@openssh.comdebug1: Entering interactive session.debug2: callback startdebug2: fd 3 setting TCP_NODELAYdebug2: client_session2_setup: id 0debug2: channel 0: request pty-req confirm 1debug1: Sending environment.debug1: Sending env LC_CTYPE = debug2: channel 0: request env confirm 0debug2: channel 0: request shell confirm 1debug2: callback donedebug2: channel 0: open confirm rwindow 0 rmax 32768debug2: channel_input_status_confirm: type 99 id 0debug2: PTY allocation request accepted on channel 0debug2: channel 0: rcvd adjust 2097152debug2: channel_input_status_confirm: type 99 id 0debug2: shell request accepted on channel 0Last login: Wed Aug  6 07:18:07 2014 from IP-SOURCEdebug2: channel 0: rcvd eofdebug2: channel 0: output open -> draindebug2: channel 0: obuf emptydebug2: channel 0: close_writedebug2: channel 0: output drain -> closeddebug1: client_input_channel_req: channel 0 rtype exit-status reply 0debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0debug2: channel 0: rcvd eowdebug2: channel 0: close_readdebug2: channel 0: input open -> closeddebug2: channel 0: rcvd closedebug2: channel 0: almost deaddebug2: channel 0: gc: notify userdebug2: channel 0: gc: user detacheddebug2: channel 0: send closedebug2: channel 0: is deaddebug2: channel 0: garbage collectingdebug1: channel 0: free: client-session, nchannels 1Connection to IP closed.Transferred: sent 4256, received 2504 bytes, in 0.4 secondsBytes per second: sent 9616.9, received 5658.0debug1: Exit status 254I have tried the following unsuccessfully till now, before posting here:Trying for a norc noprofile login by ssh user@host 'bash --noprofile'Forcing a tty by ssh -t user@hostMoved the bash_profile. Tried sshing by ssh user@host.Renaming the limits.conf file in hopes that it won't be read.Restarted ssh server.Run a command via knife as knife ssh name:server come_commandssh user@host 'ulimit -l 64', ssh user@host 'ulimit -S -l 64', ssh user@host 'ulimit -H -l 64', ssh user@host 'exec ulimit -H -l 64'I am not sure if this way of running commands inline: ssh user@host some_command works, because I can't get a simple directory listing. I also tried rebooting by ssh user@host 'reboot' but don't think the command was executed. I restarted the machine from AWS also, but unsuccessful.Is it a lost cause trying to ssh? Is there any way I can ssh into the server?
Can't ssh, connection terminates immediately with exit status 254
shell;ssh;ulimit