Can't logout ssh-session
Sometimes when I do "exit" when sshed to another PC in LAN, ssh session will not exit. The cursor just goes next line and nothing happens. I have to press Ctrl+C. This doesn't happen always - from time to time and there doesn't seem to be any definite reason for this. Help me to fix it please.
skunktrader wrote:
man ssh
contains this
The supported escapes (assuming the default `~' ) are:
~. Disconnect.
What if I entered "~" twice and ssh doesn't accept this combination any more?
Similar Messages
-
Can I set idle ssh sessions to be logged out?
I'd like to log off ssh sessions that have been idle for too long, but I am unsure where to set this. would it be TMOUT in /etc/profiles or in each user's shell profiles?
First of all i guess its useful to mention that there are no idle timeout in ssh itself, so you would indeed have to solve it in another way.
You could set the TMOUT variable in the /etc/profile, there are two problems here however;
1) not all shell implements it (bash, ksh, zsh does)
2) the user can easily change / remove it.
For tcsh i belive the syntax would be set autologout=xx .
I belive there are small deamons around which logs out users for you if they idle for to long, but i can't find anything among my bookmarks.
If you have a firewall perhaps you could probably make it do this for you as well. -
is there anyway to turn on global SSH session logging?
as in log exactly what is being done by any logged in SSH user? i know there are log levels for SSH in ssh_config but short of trying each level out i didn't see mention of a level that explicitly logged full sessions.
how about per user? i suppose i do only use 1-2 users.
thanks!Can you clarify a bit what you would like done? Do you want to log connections, logins and logouts or do you want to log SSH session activity i.e. commands are entered and what not? If its the latter you will not be able to do that will syslog. You may want to look into system accounting. For more on system accounting man "accton", "sa", "lastcomm". If you are just looking for logins and logouts the last command should point you in the right direction.
Hope that helps!
- Barrett -
Screen Sharing and SSH sessions freeze occasionally on multiple mac minis
I have 28 Mac Minis at work. With such a large number of minis, I obviously can't have a monitor attached to each of them so I've got them plugged into a network switch and access them via Screen Sharing (both via regular Screen Sharing and ARD) and SSH sessions.
A few of them seem to suffer from intermittent problems however. I'll be using Screen Sharing when the session freezes. It may unfreeze eventually, but I can also usually just quit out and re-connect and it will be unfrozen. The same thing happens when I'm connected via SSH, it will freeze and I won't be able to type in any more commands.
I need help troubleshooting (or if anyone knows what could be causing this, that'd be cool too).
I've tried connecting from both a Mac Pro on the wired network and a MacBook Pro on the wireless network. The freezing seems to only happen on certain Mac Minis as well.
I've tried switching network cables from a Mac Mini that doesn't suffer from this problem with one that does and nothing changed.
I also thought it might be a bandwidth issue at first, despite being a gigabit switch connected via cat6 to the rest of our gigabit network, but even when no significant bandwidth is being used, the freezing still occurs.
One more thing I want to test is the connection between the switch all these Mac Minis is plugged into and one of the other switches that all our other network traffic goes through. I didn't set it up myself so I fear that it might be an old, damaged cable or something. Failing that, I have no idea what the problem could be, which is why I'm posting here.
So, does anyone have any idea what the problem could be? Or any other ideas for troubleshooting the problem? Thanks.
(They're all running 10.6.8, and range from Mid-2007 to 2009 models).It would be in the system log. However, the next step would be to safe-boot in order to eliminate third-party system modifications. That goes for both client and server. If you can reproduce the problem in safe mode, then you probably have a network issue. Take everything offline except one client and one server, and test.
-
SSL / AnyConnect can't get SSH to work
Hi,
I have a working SSL vpn setup on my 5505. Once logged in ,I can use rdp, http...and so on. However, when I try to use ssh sessions to my internal hosts, I can't connect. I just get the login prompt and after a few seconds the status line goes red and displays "not connected"
I get the same error message on Windows, Linux and Mac.Hi,
Is this what you mean? Is it possible to upgrade the ssh "plug-in" on the asa 5505 separately to get it to work?
Result of the command: "show version"
Cisco Adaptive Security Appliance Software Version 8.0(3)
Device Manager Version 6.0(3)
Compiled on Tue 06-Nov-07 22:59 by builders
System image file is "disk0:/asa803-k8.bin"
Config file at boot was "startup-config"
bahnhof up 56 days 23 hours
Hardware: ASA5505, 256 MB RAM, CPU Geode 500 MHz
Internal ATA Compact Flash, 128MB
BIOS Flash M50FW080 @ 0xffe00000, 1024KB
Encryption hardware device : Cisco ASA-5505 on-board accelerator (revision 0x0)
Boot microcode : CN1000-MC-BOOT-2.00
SSL/IKE microcode: CNLite-MC-SSLm-PLUS-2.01
IPSec microcode : CNlite-MC-IPSECm-MAIN-2.04
0: Int: Internal-Data0/0 : address is 001f.cabb.c3a1, irq 11
1: Ext: Ethernet0/0 : address is 001f.cabb.c399, irq 255
2: Ext: Ethernet0/1 : address is 001f.cabb.c39a, irq 255
3: Ext: Ethernet0/2 : address is 001f.cabb.c39b, irq 255
4: Ext: Ethernet0/3 : address is 001f.cabb.c39c, irq 255
5: Ext: Ethernet0/4 : address is 001f.cabb.c39d, irq 255
6: Ext: Ethernet0/5 : address is 001f.cabb.c39e, irq 255
7: Ext: Ethernet0/6 : address is 001f.cabb.c39f, irq 255
8: Ext: Ethernet0/7 : address is 001f.cabb.c3a0, irq 255
9: Int: Internal-Data0/1 : address is 0000.0003.0002, irq 255
10: Int: Not used : irq 255
11: Int: Not used : irq 255
Licensed features for this platform:
Maximum Physical Interfaces : 8
VLANs : 20, DMZ Unrestricted
Inside Hosts : Unlimited
Failover : Active/Standby
VPN-DES : Enabled
VPN-3DES-AES : Enabled
VPN Peers : 25
WebVPN Peers : 2
Dual ISPs : Enabled
VLAN Trunk Ports : 8
AnyConnect for Mobile : Disabled
AnyConnect for Linksys phone : Disabled
Advanced Endpoint Assessment : Disabled
This platform has an ASA 5505 Security Plus license.
Serial Number: *
Running Activation Key: *
Configuration register is 0x1
Configuration last modified by * at 07:55:28.322 UTC Fri Sep 26 2008 -
ACE 4710. Unable to clear ssh sessions
Hi.
Once in the CLI of an ACE 4710, using the command "clear ssh session id" I am unable to clear/kill any of the remote ssh sessions established.
According to the administration guide, the "clear ssh .." command must clear the sessions, but it does not, or maybe I am missing something?
http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA1_7_/configuration/administration/guide/access.html#wp1050335
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tabla normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
ACE/CONTEXTO_A# show ssh session-info
Session ID Remote Host Active Time
13728 222.98.54.158:50556 67:43:38
13732 200.44.158.70:46172 67:43:36
13735 200.44.158.70:46174 67:43:36
13737 200.44.158.70:46177 67:43:36
ACE/CONTEXTO_A#
ACE/CONTEXTO_A# clear ssh 13728
ACE/CONTEXTO_A# clear ssh 13732
ACE/CONTEXTO_A# clear ssh 13735
ACE/CONTEXTO_A# clear ssh 13737
ACE/CONTEXTO_A# show ssh session-info
Session ID Remote Host Active Time
13728 222.98.54.158:50556 67:43:54
13732 200.44.158.70:46172 67:43:52
13735 200.44.158.70:46174 67:43:52
13737 200.44.158.70:46177 67:43:52Hello,
Seems to be working for me in my tests. Works in the Admin context and a user context, and when clearing connections from console connection or one of the SSH sessions.
ace-appliance-15/CTX1# sho ssh sess
Session ID Remote Host Active Time
24705 161.44.77.245:1586 0: 1:42
25100 161.44.77.245:1589 0: 0:27
25116 161.44.77.245:1590 0: 0:16
ace-appliance-15/CTX1# clear ssh 25116
ace-appliance-15/CTX1#
ace-appliance-15/CTX1# sho ssh sess
Session ID Remote Host Active Time
24705 161.44.77.245:1586 0: 2: 5
25100 161.44.77.245:1589 0: 0:50
What version of software are you running on your 4710? I am running the latest A3(2.4). Can you try this version?
Thanks,
Sean -
Capture ssh sessions in the background
Hi together,
i would like to capture all ssh-session (hidden in the background) on a solaris 10 server.
I hade some tries with /usr/bin/script -a <somewhere> in the .bash_profile but this is not what i need. e.g. "exit" exits the script and not the session.
do you have some clever idea how to solve the issue?
i can�t find any helpful tool.
chears, claudiusNo, i have a System where some users get the possibility to access the server by ssh. To have a control, what the user did - and do have a verification when he did something wrong - i would like to have a possibility to see what he did within the session (e.g. editing a configfile) I had some tries with "script" and other little OS-tools but, i was�nt able to find a perfect sollution.
Perfect meens - it�works and it is not vissible for the user. -
How to reconnect to a disconnected remote ssh session on solaris 10
hi all
How to reconnect to a disconnected remote ssh session on solaris 10
is there a way to accomplish thisNo, there's not.
A common solution for this is to get a copy of 'screen'. After connecting via ssh (or any other protocol), you can start a "screen" session. If you get disconnected (or disconnect intentionally), you can later come back on the machine and bring your existing "screen" session back.
Darren -
SSH sessions over Putty die unexpectedly & commandline entry is slow
I have a Sun Ultra-60 running Solaris 9 at patch level 118558-05. Users of this server report that their ssh sessions over Putty to this server die unexpectedly anywhere from one to two times per week. The users are usually in a vim session at the time editing php files for the website hosted on the system. Another problem reported is that the user's command line input slows dramatically and they must wait for the server to complete the line they were typing prior to proceeding.
I cannot find the source of this problem. To date, the following is what I have tried in my troubleshooting efforts.
1) ptdiag - reports no hardware failures
2) /var/adm/messages - reports no issues relating to the problem mentioned above.
3) swap -l - the server has plenty of swap and shows no need for additional swap space Here is the output from swap -l
swapfile dev swaplo blocks free
/dev/vx/dsk/swapvol 213,6 16 8389632 8358176
I should also mention that /tmp is not full and is currently only at 2% of it's capacity.
4) ndd shows that the link speed, duplex, etc. are correct at 100Mbps full-duplex.
5) System uptime is at 337 days and the uptime command currently shows the following load: load average: 0.12, 0.11, 0.09
6) vxdisk list shows the two internal mirrored disks as being online and no errors. iostat -En shows no soft or hard errors on the two disks
7) This server only has two users and the main applications in use are mysql and apache.
8) I have upgraded to the latest version of the vim editor and the problem still persists. I have also had the users upgrade to the latest version of Putty and to turn on the logging feature of Putty which hasn't revealed any information as to why the sessions are unexpectedly terminating.
9) I have checked the /etc/default/login setting for the "TIMEOUT" variable which is commented out. I also checked the users profiles and verified that there are no timeout variables defined.
10) Here is my netstat -i output:
Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
lo0 8232 loopback localhost 52375982 0 52375982 0 0 0
qfe0 1500 servername servername 2319804623 29884 1493848177 0 0 0
qfe1 1500 servernamea servernamea 231550668 0 3694 0 0 0
qfe2 1500 servernameb servernameb 40944152 1 65630146 0 0 0
Some of these numbers look high, but I don't see any collisions.
Any help would be appreciated. If additional commands need to be run, please advise and I will gladly post.
Thanks much for any assistance.Hi Darren,
The user's vim session dies when the users are actively typing.
As for there being a firewall or NAT device between the workstation and the server, yes, there is. The users are in one building and the server is housed in a datacenter in a separate building. The users do not have this issue with out other Solaris 8 and Solaris 10 servers...only this one particular server. A traceroute to the server takes only 5 hops and returns quickly.
As for the logs, I just checked /var/adm/messages and it is reporting the following types of messages over and over.:
[ID 317013 daemon.notice] bpcd[11746] from some IP
I think these messages are generated from Veritas Netbackup which is administered by a separate team than what I am on, but I can have them investigate. -
Logging all SSH sessions? (Package to do it?)
heya,
I was wondering if there was a foolproof way of logging all commands executed via SSH? (i.e. logging all remote SSH sessions).
I know you can do it manually via "script", or replacing the login shell, but I was hoping for perhaps a program/service, that did it automatically. (Just like how etckeeper managers all your configuration files).
Also, I'd need it to work with all logins, including password-based ones as well.
Cheers,
VictorOn Solaris, you would probably use BSM. A search on google for "bsm linux" reveals some alternatives for Linux which you could try.
-
LMS 3.2 doesn't terminated SSH sessions on ACE
Hi all,
the customer has a problem with LMS 3.2. This software doesn't terminate ssh sessions created by LMS on ACE. All ssh sessions still exist on ACE, so no new ssh session can be created until the administrator manually clear these session on ACE. Thank you for your advice.
RomanHi Gaganjeet,
thank you very much for your reply. But I think, that this problem is with LMS, because I used some manually created SSH sessions on ACE an these sessions was terminated correctly. I'm sending you the output from one ACE module:
ace1/Admin# sho ssh session-info
Session ID Remote Host Active Time
789 10.210.40.41:24389 280: 2:14
3946 10.210.40.41:37910 160:47:13
7394 10.210.40.41:46981 256:46:54
11129 10.210.40.41:11010 136:46:43
11651 10.210.40.41:11295 136:40:53
14651 10.210.40.41:20522 232:46:45
15143 10.210.40.41:20759 232:42:26
18317 10.210.40.41:32636 112:47: 5
19061 10.210.40.41:35109 112: 2:25
19152 10.210.40.41:35240 112: 0:20
21886 10.210.40.41:42629 208:47: 1
22383 10.210.40.41:42839 208:43:14
25713 10.210.40.41:7305 88:47: 4
28996 10.210.40.41:48379 400:47: 8
29105 10.210.40.41:16016 184:47:16
29579 10.210.40.41:16193 184:44:15
You can see that there are a lot of ssh sessions from LMS (10.210.40.41) with the long active time.:-(
Best regards
Roman -
Can't connect via Screen Share or Web Server, but can ping and ssh
Bit of an odd problem here.
My Mountain Lion Mac Pro (called "Trogdor" for convenience) is connected to my work university network. I can ping it from anywhere-- elsewhere on the network, from home behind a firewall. Can connect over ssh from everywhere. I can also connect to other computers (on the same network or at home behind a firewall) from Trogdor via ssh, Screen Sharing, etc.
But I can't Screen Share into Trogdor, and I can't connect to Trogdor's built-in web server, either system-wide (in /Library/WebServer) or for my username (~/Sites). (I can connect to the web server from Trogdor.)
Note that I can do both of these for other computers on the same network (same subnet, etc), so it's not a network issue. I can't do these from anywhere: same network or from home. I have this problem whether I use Trogdor's hostname or its IP address. (I can look up its hostname using the IP address with the "host" tool in Terminal, and vice versa.)
So it sounds like a port issue, right? Except I don't think I've ever messed with my port settings directly. How do I diagnose the problem? Should I scan my ports? Can I return port settings to default?
Thanks!
Message was edited by: supercresBit of an odd problem here.
My Mountain Lion Mac Pro (called "Trogdor" for convenience) is connected to my work university network. I can ping it from anywhere-- elsewhere on the network, from home behind a firewall. Can connect over ssh from everywhere. I can also connect to other computers (on the same network or at home behind a firewall) from Trogdor via ssh, Screen Sharing, etc.
But I can't Screen Share into Trogdor, and I can't connect to Trogdor's built-in web server, either system-wide (in /Library/WebServer) or for my username (~/Sites). (I can connect to the web server from Trogdor.)
Note that I can do both of these for other computers on the same network (same subnet, etc), so it's not a network issue. I can't do these from anywhere: same network or from home. I have this problem whether I use Trogdor's hostname or its IP address. (I can look up its hostname using the IP address with the "host" tool in Terminal, and vice versa.)
So it sounds like a port issue, right? Except I don't think I've ever messed with my port settings directly. How do I diagnose the problem? Should I scan my ports? Can I return port settings to default?
Thanks!
Message was edited by: supercres -
How can I set a Session bean timeout
Hello !
How can I set a Session bean to time out eg. 48 hours ?
Thanks
Uiloq SlettemarkFor stateful session beans you can use the timeout attribute in the orion-ejb-jar e.g.
<session-deployment timeout=1800 ..>
this is specified in seconds and Default Value: 30 (minutes)
regards
Debu -
How can I save a session to another hard drive or flash drive?
I want to rebuild my hard drive but I want to save the Firefox session (like 70 tabs) before I do so I can reload them after the rebuild. Can I save a session to another hard drive or flash drive?
The data of the current session is stored in the sessionstore.js file in the profile folder.
See also:
*https://support.mozilla.org/kb/Recovering+important+data+from+an+old+profile
*http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
You can use this button to go to the Firefox profile folder:
*Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder) -
How can i lookup a session bean from the client side
how can i lookup a session bean from the client side...........i am using sun appserver..............
this is my code.................[B]
private final static String JNDI_NAME="ejb/LmsBean";
private static String url="ldap://localhost:4848";
Hashtable h=new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
h.put(Context.PROVIDER_URL,url);
System.out.println("Before Loading Context in Delegate");
Context ctx=new InitialContext(h);
System.out.println("Loaded Context in Delegate");
Object obj=ctx.lookup(JNDI_NAME);
System.out.println("Loaded Object in Delegate");
System.out.println("Before Loading Home in Delegate");
LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
System.out.println("Loaded Home in Delegate");
lms = home.create();
System.out.println("Loaded remote in Delegate");
[B]and i got the exception........
Inside Client before calling delegate
Before Loading Context in Delegate
javax.naming.CommunicationException: Request: 1 cancelled
javax.naming.CommunicationException: Request: 1 cancelled
at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.ja
va:136)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
a:66)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
62)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.parx.lms.lmsdelegate.LmsDelegate.getController(LmsDelegate.java:3
0)
at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(LmsDelegate.java
:50)
at com.parx.lms.client.consoleClient.Client.main(Unknown Source)
pls go tru the exception and pls help.........That url string should be having the server name or ip instead of localhost.
Maybe you are looking for
-
Third-party headphones which work?
Does anyone know of third-party in-ear headphones with mic and control button which actually work with iPhone 4? I'm getting a sinking feeling that I either have to spend a huge amount of money or else wait for months for the manufacturers to catch u
-
what's the best way to move content to a new library I created ie a holiday music only library?
-
When browsing in private mode, I am unable to download any kind of files. Either from CNET or just a plain flash, the download function doesn't happen. Even if I right click and save as, nothing happens. I have to go back into normal mode to get the
-
Premiere Pro CS4 compatibility with windows 8.1
Does anyone know if it is possible to run Premiere pro CS4 on windows 8.1 or windows 7? Thanks!
-
Hi- I would greatly appreciate any help. I just bought my imac for iphoto and imovie. It is a bit more difficult that expected. I made two slideshows in iphoto. I saved them as .mov files by exporting them from iphoto. When I open imovie it will not