Ask Your Question
0

how to "resume" a ssh session

asked 2014-12-23 06:17:51 -0500

Sampson gravatar image

updated 2014-12-23 12:10:35 -0500

mether gravatar image

I have a SSH session from my home workstation to my home server (all running Fedora 21)

In the session, I am move huge amount of data (1.4T from /dev/sdc to /dev/sdb of server)

Now my workstation is busy, and I want to check the file move status.

Can I use a third machine (Mac OSX or another Fedora 21), SSH to the server and "resume" or "continue" the SSH session from workstation to server?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2014-12-23 07:37:47 -0500

cobra gravatar image

updated 2014-12-23 07:42:06 -0500

It's not totally clear what you're doing here, is it this?

ssh <server>
cp <source>/<dir>/* <dest>

Then you leave that running until it's finished, but part way through you want to see how well it's working, from the client/workstation upon which you typed these commands?

You have a number of options to do this. Here are a few:

  • You could use cp -v ... when copying the files, it'll then show which files are being copied as they're done - the output will appear on your ssh terminal. (see the man page for cp)
  • You could ssh in again from another terminal - if you're in text mode (which I assume since you'd just open another xterm if you weren't) you should be able to press CTRL-ALT-F2 to F6 and get another login prompt - just ssh into the server again from there and take a look into the destination directory to see how many files have been copied.
  • You could press CTRL-z to suspend the copy process, inspect the target directory to see how far it's got, then use the fg command to bring the copy process back to the foreground and continue.
  • You could set up 'screen' which will allow you to have a reconnectable session running on the server an connect to it from your ssh session as often as you like. Gnu.org have a user manual page for screen.
  • You could set up a VNC server session and forward that connection over the SSH link, the desktop on the server would then remain while the server was running and you could connect and disconnect as often as you like.
edit flag offensive delete link more

Comments

I want to see from a third machine.

It seems the 'screen" and the "VNC server" might fit my need.

Will try that out.

Sampson gravatar imageSampson ( 2014-12-23 08:03:43 -0500 )edit
0

answered 2014-12-23 07:30:52 -0500

dearfriend gravatar image

'screen' can help you to make the things you want.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-12-23 06:17:51 -0500

Seen: 264 times

Last updated: Dec 23 '14