When connecting to a server, is there a way to keep the SSH console open once disconnected? Or is there a program that does that, and that lets me connect back into where I left?  This situation can happen for instance if I start a simple manual backup using cp from towards that takes +1h. I may not be able to wait and have to close the connection, but I still want my command to finish and I may even login later and check the result message.  My current method achieving this, is to login to the a desktop installed on server using VNC. Open terminals remain open and I can let them run something, log off, and come back later and just continue where I where I stopped.  Is that possible within the command line so that I am not dependent on the remote desktop?
5102
Let's say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine?
48730
..and then still be able to return to the same session/screen after restarting the terminal machine. I've tried screen but once I restarted my computer screen -d showed no sessions. Nohup seems to be what I want, but then I lose the ability to see the output later on, other than by saving it to a file. Cannot I pretend more?
43281
I frequently login to a server, then cd into a specific directory. Is it possible to simplify these two commands into one?   ssh bob@foo   cd /home/guest   I'd like to avoid changing anything on 'foo' if possible, as I'll have to clear it with the server administrator. I use bash, but I am open to answers in other shells.
15366
I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back.  One way I thought of doing that was to transfer its ownership to a screen shell, thus keeping it running in there.  Is there a different way to proceed?
32475
If I'm logged into a remote Linux machine, I know I can suspend a process (cntr-z) and move it to the background (bg 1) but if I disconnect from the machine, the process stops.  Is there a way I can leave it in the background and have it there when I log back in? This is a very long running process.  On Ubuntu, logged in via SSH.
59836
I frequently ssh into my box at home from school, but usually when I change classes and my computer suspends, the pipe will be broken. However, ssh simply locks up - Ctrl+c, Ctrl+z and Ctrl+d have no effect.   It's annoying to have to restart my terminal, and even more annoying to have to close and re-create a new screen window.  So my question, is there an easy way to make ssh die properly (i.e. when the pipe fails "normally" it will exit with a message about a broken pipe)? Or do I have to figure out what the PID is and manually kill it?
39000
Currently i invoke the following:  $ ssh me@host.com my_cmd   This is slow and not easy to automate safely. I would like to establish ssh connection once and have some script that will forward my commands to host.com and print output.  Is that possible ?  Adding my machine to authorized_keys is not an option for me and it wouldn't solve slowness issue.
21241
I use a remote desktop program (usually ) to connect to a Windows machine everyday. The remote computer has a fixed IP address, and if the computer is on and responsive, I can access it and even reboot the computer remotely if necessary.  Unfortunately, if the remote computer freezes (for example, if it gets a blue screen), as far as I know, I can't use a remote desktop solution to restart it. Similarly, if my computer is off, I can't use remote desktop to boot it.   I know that one solution is to ask somebody who is physically near the computer to press the reboot or power on button, but I am opening this thread because I am interested in solutions that do not require the physical presence of people to turn on or reboot a remote frozen computer.  Is this possible? If so, what are my options?
64339
I have a small script that runs on each workstation which runs defrag and chkdsk and connect each workstation temporarily to a network share that they, normally, do not have access to. The command I use to connect to them is:  net use \\server\sharename [password] /USER:domain\username P:No   Is there a command to log that user out of the drive share without restarting the computer?  Workstations run on Windows XP SP3  EDIT: I've used:  net use \\server\sharename /delete   but the command returns "The network connection cannot be found". However, I can still navigate to \\server\sharename in MyComputer address line and have full access to it still.  EDIT2: Assume I've read through the help files for net use   ;D  EDIT3: Would a reboot suffice? Yes... however it is more convenient to log the user out of the share instead =D. I know I'm difficult.
42861
Let's say I'm running a simple server and have accept()ed a connection from a client.  What is the best way to tell when the client has disconnected? Normally, a client is supposed to send a close command, but what if it disconnects manually or loses network connection altogether? How can the server detect or handle this?
80365
Is there a way to unlock and lock screen from command line, via ssh? I know /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend command, but it doesn't seem to work via ssh. The perfect solution would be a command, that I could type logged via ssh and it would unlock the screen or lock it back again, so I don't need to tell anybody my password, if he wants to use it. Is there any builtin tool, that would provide such functionality?
14619
When I'm logged on to another host (e.g via ssh), how do I connect to the XServer of that machine (same user is logged in and is running a desktop (gnome))?  You may ask way I wish to do that: There are commands that don't open an X-Window, e.g. xinput, xhost, etc.. and there are situations where you want to run them from remote.
162
How to check the opened/closed ports on my computer?  I used netstat -a on command line.   Does the port status "LISTENING" indicate that the port is open? Is any port, that is not shown in the output, closed?
73734
I'm writing an unattended shell script that sets up a new server. Since I may run it multiple times, I want to check whether passwordless SSH access has already been set up. A command like  ssh newhost.example.com /bin/true  will exit successfully if the access exists, but if not, it will hang waiting for a password to be entered.  Is there a way to turn off the possibility of password access for such a command so that it will quickly fail if passwordless access is not yet set up?
116137
Is there a way to back out of all SSH connections and close  in "one shot"?  I work in Windows 7 and use PuTTY to SSH to various Linux hosts.  An example of the way I find myself working:  SSH to host1 with PuTTY... banjer@host1:~&gt; #...doin some work...ooh! need to go check something on host8... banjer@host1:~&gt; ssh host8 banjer@host8:~&gt; #...doin some work...OK time for lunch. lets close putty... banjer@host8:~&gt; exit banjer@host1:~&gt; exit Putty closes.   Per above, any way to get from host8 to closing PuTTY in one shot?  Sometimes I find myself up to 5 or 10 hosts deep.  I realize I can click the X to close the PuTTY window, but I like to make sure my SSH connections get closed properly by using the exit command.  I also realize I'm asking for tips on how to increase laziness.  I'll just write it off as "how can I be more efficient".
48315
I am using Windows 7 and have multiple FTP client applications working without any problem. However, when I use command-line FTP, I can get connected, log in (after entering user name and password), but it always gets disconnected when the dir or ls command is used. The response is:     Connection closed by remote host.   How can I fix this problem?
119308
We have Windows 2008 r2 servers running at the moment.  If I log into the server using remote desktop connection, and then someone else tries to log into the same server while I am working on it, I get thrown off the server and am displayed the following message:     Your Remote Desktop session has ended.      Another user connected to the remote computer, so your connection was   lost.  Try connecting again, or contact your network administrator or   technical support group.   My question is, is it possible to configure the server to stop this from happening.  So instead of kicking off the user who is already working on the server, stop the second user from connecting or allow both to connect at the same time?