Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a couple of computers that I manage using Canonical Landscape.

Both of them are behind routers and in different cities so I can't easily SSH into them using openssh. They're running Ubuntu 12.04 Desktop Edition. Can I use Landscape to SSH into the computers?

share|improve this question

No, but you can use landscape to run commands on the box. You could (for example) run whatever you wanted to run via ssh, but as a script.

Another option would be to setup a reverse SSH tunnel via that script system.

So you could create a script to run on the landscape managed host which ssh'ed back to your home machine or some other publicly accessible IP:-

ssh -R2222:localhost:22

You'd need an ssh key to already be generated without a pass-phrase on the remote machine and place the public part on 'homeserver' in ~/.ssh/authorized_keys as a pre-requisite to doing this.

Once that ssh tunnel is setup, you should be able to (on

ssh -P 2222 username@localhost 

This will redirect ssh (on port 2222) from to port 22 on the remote host.

share|improve this answer
I get that I can run commands as scripts, but (excuse my noobish), how do you deal with feedback that those commands give? For example, running sudo apt-get install foo will prompt for a "Y/n" response after it's run. – Benjamin Humphrey Sep 16 '12 at 10:51
For apt-get it has a "-y" option to make it just auto answer "yes" to those prompts. Other commands can have "foo < echo 'yes'" fudged into them. Each command is different though of course. – popey Sep 16 '12 at 14:14

You currently cannot use Landscape as a remote console proxy, but it is one of the most-requested features, so it is in active consideration. If you want to provide more information on what your use case would be, that would be helpful -- I am gathering, getting around non-routable IPs and firewall(s) is your need?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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