General :: Grabbing TTY Output From Remote Machine
Mar 24, 2011
Here's the scenario, rsync is running in RMT on tty2. I (LCL) am connected to RMT remotely as root over ssh. Is it possible to grab output of RMT's tty2 on my LCL? I don't want to redirect RMT's tty2 out to my pts, just get a mirror output.
I want to be able to grab some text from a directory listing in a bash script, and then apply that text to future commands in the same script. For instance, say I do "ls -lais /media/Movies" and get:
2147560409 712544 -rwxr-x--- 1 root users 729645056 1999-03-07 11:45 Young Guns (1987).avi 2147560410 712400 -rwxr-x--- 1 root users 729497600 2002-01-09 01:11 Young Guns II (1990).avi
Then say I want to grab the year from this output and then use that information as part of the command to modify the file timestamp, such as:
2147560409 712544 -rwxr-x--- 1 root users 729645056 1987-01-01 12:00 Young Guns (1987).avi 2147560410 712400 -rwxr-x--- 1 root users 729497600 1990-01-01 12:00 Young Guns II (1990).avi
Anyway, that's just one example, but I often find myself needing to do this type of thing, and I'm sure its possible, just not really done enough scripting recently to know how to do it.
I'm doing some commands on a remote server (using ssh to log on to the remote server, did a ssh key swap), how do i redirect the output of a command back to the local server ?the person who helps me out is my HERO i'm really stuck on this and it would bring me a lot further if i get this to work
I want local programmatic access to ssh output in Mac Terminal. First, I tried redirecting the output of each command to a file. The file was perfect, but of course it was on the remote server, and an sftp for each command output seemed a little.. Next, I tried to Applescript Terminal, but it only gives access to the currently visible text in a tab (i.e. if half the output has already scrolled out of sight, it doesn't get returned - useless).
Last, I tried piping ssh to tee (e.g. ssh user@host | tee output.txt). This almost worked. I have the output in a local file, but there are a lot of unwanted characters mixed in. For example, every time I hit backspace, there's a ^H in the file. There's also text like "[0m[K" which is harder to get rid of.
ow do you remotely shutdown an XP host from a linux machine? I know that you can use shutdown /s /f /m IP_GOES_HEREFrom windows, but how would you do that from linux? (wine does not port the shutdown command)
I have a VPS by my host running on a linux server, and they have given me SSH access. Is it possible to remote desktop into the server, like you can on Windows, so that I can physcially click on things rather than having to use SSH commands?
Surely this must be running on Fedora or Ubuntu etc. so there is some type of OS. You would probably have to install something on the servers end I suppose but just want to know if its possible and what the options are.
I have looked for clues in the sshd.conf etc. But I can't really find anything that give me a hint of why fedora 14 keeps blocking my access.I get all the way into the ssh interface.
So it's not a firewall problem and the port forwarding is working fine. I am using putty to access the machine remote.Anyone have any ideas of what I need to set in ssh or sshd.conf. I am expecting to login with password not with keys.
I can construct a RE to match <start-marker>.*<end-marker>, but is there a utility that would return *just* the <good stuff> I'm interested in? I realise that the alternative is something along the lines of:
Code: cat <input-file> | awk -F'start-marker' 'print ${2}' | awk -F'end-marker' 'print ${1}' but it would be better if I could do it all in one go.
Whenever I put ssh into remote machine am getting the following messages. Write Failed: Broken Pipe (After logged into that machine ) Read Socket Failed: Connection reset by peer (While trying to log in ) Also known_hosts file is changed frequently.
Can I do a fresh install of CentOS Linux on a remote machine? I have a machine with Windows NT in a remote location. Now I want to use that system as my deployment machine. To proceed with my plan I need to install a Linux OS (have chosen CentOS). The guy there with the machine is not very knowledgeable of the installation process of any OS. So I thought I could install CentOS remotely.how I can achieve this?
i need to get file from a remote solaris,but i can't telnet or ftp it to directly i have to go via another solaris server ,it goes like this windowsbox-proxyserver-mainserver
I'm using Ubuntu 11.04. I have a Windows XP box in which I've installed SFU 3.5 and Interix (Subsystem for Unix-based Applications). I want to run a batch script on the Windows machine from my Linux box, whether on-demand or in a cron. How do I do this from the Linux side?
My cousin needs some help with his computer (I know a bit more about MS then Linux at this point). He has VISTA HOME EDITION, Which as far as the internet tells me ... cannot do RA without a third party software. But he says he found it and sent the invite to my email. I have already download rdesk (I think that's what I want) so I can initiate a RA from terminal with IP or server URL, But everytime I try to access his through IP it says:
Code: me@linux:$ rdesk ip.cous.comp.here !!--'DISPLAY FAILED TO LAUNCH' me@linux:$
I was going to also look at getting tightVNC, but am not 100% sure it does what I want... Other then this I have no idea what to do. I have never done remote with a Linux and a MS system ...
(By the way, I am running Dreamlinux which is Debian based. It is the latest -far as I know- which is 3.5 built on Lenny stable. My desktop session is Xfce, but I can enable KDE or GNOME for applications that may need it. My cousin and I are 100 miles apart at the moment so this seems to be our only option.
I have a Ubuntu server hosted on Amazon EC2. I need to create an automated backup scheme so I created another Ubuntu instance on my local network which is hosted in a virtual environment. I managed to transfer the necessary files between 2 machines on the same network using the rsync command:
How can I do the same thing but transferring files from my Amazon server to my local server? Is there a way I can achieve this with port forwarding, or by VPN, or anything else? It doesn't have to be rsync. If you know about a better method, kindly let me know.
I've been trying out qemu to play around with some VMs. It's working well but I keep wanting to be able to view the text (linux boot process) that quickly scrolls by in the qemu window on startup of my linux virtual machine. Is there any way to retrieve this via qemu?
I recently purchased a linux VPS from [URL] just to learn and play around with. I currently ssh into the machine via Putty from various Windows boxes. Is there anyway to throw some mp3s on the remote server and then have them play locally? Server is currently running Ubuntu Server 10.04.1.
In the past, when I open a gvim session on a remote machine, the title bar of gvim would show the machine name in brackets. I am not sure if this was done by the remote gvim itself, or the local window manager. In the past I have used gnome2, although I am currently using unity (and finding it rather frustrating). Is there some setting I can change to always force remote windows to display the source machine?
There is a way to make a remote access from a Ubuntu Linux to a Windows 7 machine using RDP(Remote Desktop Protocol)? I use "mstsc.exe" for Windows to Windows connections. What is like "mstsc.exe" that I can easily run from Ubuntu?
I would like to setup a remote desktop for my Ubuntu computer so I can use my computer on a Windows computer that is on a different network. How can I do this?
I was looking for:how to access my Linux machine(OpenSuse 11.3) that is being hosted at my hoster company from my home Win Pc, I found TightVNC , but I am confused, should I install it on both systems ( viewer and server) ? .. what about the VirtualBox , can i Access with that tool or it is only for mounting the local Virtual Machines?
I had logged into a remote server through ssh and was runing some rsync commands on the server. Rsync was outputting information in the ssh cli when the client machine (the machine I was using) crashed because of an unrelated issue. Normally, if, say I'm are downloading something with wget, I usually output the info to a log file and then I can simply tail that file later. But what if I'm not using a log file? Is there any way to later log back in to a system via ssh and resume the output I previously had?
when the user clicks a button (assume war application) and the action'system.out.println' a message, how can I *remotly* read this message (read the message from a different computer instead of the server)?when I use the eclipse, I can read it from the console but if I'm in adifferent location, how can I see this message remotely?I'm thinking about remote debugging (JPDA), however, it's very difficult to configure in order to make JPDA run. I tried based on tutorial of google search, bug failed.I wonder if remote debugging can actually solve my problem. If not, is there any other to solve