Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This question already has an answer here:

When I open a SSH session on my terminal to a remote server, is this only a virtual terminal, or is it possible for the SSH server that I am connected to to "take control" of my terminal? For example, I am on a desktop, is it possible for the SSH server on the remote end to say, re-size my window with any input from me?

share|improve this question

marked as duplicate by Gilles, Networker, Ramesh, slm Sep 3 at 23:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
beginer's answer illuminates an ambiguity in your question. I suspect that you mean, "is it possible for (software running on) the SSH server that I am connected to take control of my terminal through the SSH connection?" –  G-Man Sep 3 at 16:20

3 Answers 3

You have an SSH session, but you are running it from a terminal.

The SSH protocol doesn't give the server much control at all. There's almost nothing it can do to you (other than capture your typing).

But the terminal you are running may chose to respond to terminal requests that the server sends. It may send a command that requests a terminal resize, and your terminal may respond to that request by changing the font size or by changing the window size (or you might configure it to ignore the request). That's all dependent on the terminal/terminal emulator you are running and not on the SSH transport.

share|improve this answer

ssh login is similar to any other login you make directly on the system. It is all the same as physical login only that you do it remotely and you get a remote shell.

But regarding your question, am not sure what you have asked is possible, but yes if the user with which you're sshing has the privilege and the script or tool to do that from a different session, directly logged in from the system, then yes it is possible with remote login using ssh too.

share|improve this answer

It is possible to resize a window (in Xfce, Gnome 3.8, and probably a few other desktop environments) with something like this command*:

wmctrl -r :ACTIVE: -e "0,20,20,500,500"

Anyone with access via terminal or SSH can use them to control most of your computer using aviable commands in the user's path.

*I know about this sort of usage of the wmctrl command from this script, which can be used under Xfce (and probably other desktop environments) to control window geometry - see also this article.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.