Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
launch ssh and launch remote terminal app in one command?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Timothee
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2005
Posts: 96
Location: Singapore

PostPosted: Mon Apr 14, 2008 8:03 am    Post subject: launch ssh and launch remote terminal app in one command? Reply with quote

Hi all,

I have setup ssh+screen+rtorrent on my home box for remote access.

On my office box, I'm trying to create a one liner command so I can both connect via ssh and launch screen immediately. I tried the below but I always get the same message: "Must be connected to a terminal."

Code:
# ssh -l timothee mydomain.homedns.org screen -R
Must be connected to a terminal.

I also tried building a startup script like this:
Code:
#!/bin/bash
ssh -l timothee mydomain.homedns.org <<EOF
screen -R
EOF

but this only produces:
Code:
Pseudo-terminal will not be allocated because stdin is not a terminal.
Must be connected to a terminal.


Is what I want to do possible?

Thanks for any advice!
Tim.
Back to top
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Mon Apr 14, 2008 8:13 am    Post subject: Reply with quote

ssh(1) wrote:
-t Force pseudo-tty allocation. This can be used to execute arbi‐
trary screen-based programs on a remote machine, which can be
very useful, e.g. when implementing menu services. Multiple -t
options force tty allocation, even if ssh has no local tty.

_________________
Saving the world, one kilobyte at a time.
Back to top
View user's profile Send private message
Timothee
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2005
Posts: 96
Location: Singapore

PostPosted: Mon Apr 14, 2008 8:16 am    Post subject: Reply with quote

Thanks for that Tarpman, and big RTFM on me :oops:.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum