ugh, how do I ctrl-C out of a connection to a remote server when I'm done?
- From: Bennett Haselton <bennett@xxxxxxxxxxxxx>
- Date: Fri, 27 Mar 2009 16:25:48 -0700 (PDT)
Sometimes in an SSH window, I will try and connect to another host on
port 80 or 25, to see what happens if I send a request consisting of
certain headers, and what response the server sends back. The problem
is -- and this seems like a real newbie question, but nothing I have
tried works -- is that once I'm done getting the response back,
sometimes the remote server doesn't close the connection, and nothing
I do on my end - Ctrl-X, Ctrl-C, Ctrl-Z, or whatever -- causes the
connection to close. What do I press to make the connection close, so
that I get my shell prompt back?
(I am actually on a Windows machine using an SSH client to connect to
a CentOS host that I run, before telnetting from that CentOS host to
the remote host. However I'm not sure if that should matter since
when I press Ctrl-C or Ctrl-X or whatever, the SSH program seems to
pass that straight through to the remote CentOS host just as if I'd
pressed the same keys on a local terminal.)
A typical transcript looks like this. That ^X ^c junk at the end is
me jamming the Ctrl-C and Ctrl-X keys trying to make the connection
[root@fast ~]# telnet www.facebook.com 80
Connected to www.facebook.com (188.8.131.52).
Escape character is '^]'.
GET / HTTP/1.1
HTTP/1.1 302 Found
Date: Fri, 27 Mar 2009 23:21:39 GMT
-Mar-2039 23:21:39 GMT; path=/; domain=.facebook.com; httponly
e50fea765c3369f89f388a31fba99cb84714e3a701e8dc49d01bb; expires=Sun, 26-
pr-2009 23:21:39 GMT; path=/; domain=.facebook.com; httponly
Content-Type: text/html; charset=utf-8
- Prev by Date: Re: Error 1 attempting to build binutils-2.19.1
- Next by Date: Re: ugh, how do I ctrl-C out of a connection to a remote server when I'm done?
- Previous by thread: How to skip directory in tar file.
- Next by thread: Re: ugh, how do I ctrl-C out of a connection to a remote server when I'm done?