General :: Remotely Run Script On Unix, Get Output Locally?
Apr 13, 2010
I need to run a (Tcl, or whatever) script on a remote Unix machine, from a (local) Windows command shell, and I want the stdout/stderr of the script to show up in the Windows CLI. The exit code would also be useful.
Is it possible for me to SSH to another server in Linux (Ubuntu), run a program there but display it locally?And is it possible for me to SSH to another server in my terminal,and configure it so that all graphical programs (Firefox, Emacs) run in that SSH session will be displayed locally?
I can set my EDITOR variable in my .bashrc to e.g. gedit, which is a nice graphical editor on ubuntu. But when I log in over PuTTY that editor will fail.What is the best way to detect if I'm logged in and can run a graphical editor, or not, and set EDITOR appropriately?
I've got an SSH server setup on my box which is running locally fine. I can connect to it through my local laptop but when I try to connect through the internet either via my IP or using the DynamicDNS I have setup both get an operation timed out message.I've got firestarter running with an inbound policy to allow connections from any host to port 22. I've also gone into my Netgear router and selected to forward any inbound connections to port 22 to the IP of the box that's got the SSH server on it.
Even with all this the connection just isn't being made. I've also tried temporarily setting the DMZ option on the router to forward all inbound connections to the IP of the Ubuntu box but still get the same Operation time out. Is there any other options that wouldn't allow remote connections via SSH? Or am I missing something hugely obvious here? Maybe it's possible to connect to SSH via a different port or something?I'm running Ubuntu 10.4 and have installed openssh-server via Synaptic. Would be great to get this working so I can use it as a tunnel from work and access the VNC, which I've been told should be done via SSH anyway.
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.
I'm running vsftpd-2.2.2 on Slackware 13.1 and I'm behind a NAT with a dynamic IP. I'm using pasv_address, which makes it necessary to have a crontab that checks whether my IP has changed, and if it has, edits the conf and restarts vsfptd. It's hackish but it works. I have also enabled FTPES on the same port that normal FTP runs. I have allowed only the 5001:5003 ports and I am aware that the recommented is 50 ports. However I never had an issue with the transfers since I'm the only user and have at maximum two simultaneous transfers.
I can connect remotely with FTP and FTPES with every client I tried but I'm having issues locally. FileZilla refuses to connect on FTP and FTPES. WinSCP can connect on FTP but not FTPES. Issues are gone if I enable pasv_promiscuous, which the manpage strongly recommends not to use unless "you know what you're doing". I don't. Why is this happening? And, can I fix the local connections without resorting to pasv_promiscuous?
Here is my config and log files from a failed local attempt.
I am trying to set up a ssh server on my desktop computer. It runs Ubuntu 10.04 with Win 7 (dual boot). I want to ssh into my desktop from any other machine (from anywhere), and I'm not sure if setting up a ssh server is the right thing to do. Also, is it secure? what kind of encryption does it use
Kernel: Linux 2.6.26-2-686 (i686) Compiled: #1 SMP Thu Nov 25 01:53:57 UTC 2010 C Library: GNU C Library version 2.7 (stable) Distribution: Debian GNU/Linux 5.0.8 Desktop Environment: GNOME 2.20
Gnome comes with Vino Remote Desktop as part of it's package. I want Vino to run at boot so that I can login remotely. I am using VNC-4.1.3 for remote viewing. However, I can only view remotely once I have logged-in locally.
I'm having issues with my SSH server.The server is running on a Slackware 13.37 machine, using the default SSH server software, which I believe is OpenSSH.On my Windows machine, I've tried connecting to my Slackware machine but can only do so using the external IP, not the LAN IP, instead I get a "Connection Refused" error using PuTTy. I've forwarded port 22 for both UDP and TCP packets to my Slackware machine.I don't really know what information you need so just ask me and I'll respond to the best of my abilities.
I'm not terribly new to Linux, but I am new to the forums, so hear me out! I am in the process of creating an electronic mapwall for our meteorology program, and have designed the computing system from scratch. I have two Linux Boxes, each with capabilities for 6 attached monitors...a total of 12 displays driven from two machines. My intention is to have one machine be the master...it has a touchpanel control. The inputs to the touchpanel will then trigger events for the both the master and the slave machine to display. Each of them has a specific IP address (DNS entry), and are not on a subnet.
Now...is there a way to remotely login to the slave machine and have it display on it's OWN monitors? The code is Java and which works on the master machine to animate directories of .gifs for each of the master's attached monitors. I will most likely have Java execute shell commands for the remote login (ssh), but I believe the answer lies somewhere in the X-configuration. Do I have the machines in an adverse configuration (creation of a subnet would be better)? Lots of questions...lots of desire...few answers!
I was wondering if you can 'share' devices in Linux by overlaying the devices nodes? For instance, is it possible to use SSH (FS) + bind to selectively bind devices locally?
I set up apache (apache2) to create a moodle server, but I can't get it to work globally. Here is the rub: http://192.168.0.150 works beautifully, showing me the index page at /var/www [URL] (my dyndns) or http://96.49.75.14 (my current IP address) doesn't work.ssh works well globally, i.e. ssh -l myname [URL] works. pinging [URL] works without a problem. Ports 22, 80 and 443 are open on my router (checked my router's settings).I use ubuntu 10.4. Is it an iptables problem, as in http://www.linuxquestions.org/questi...achine-750157/ ? But I couldn't figure out the iptables manpage.
I have rhel5.4 in my vmware , i am trying to install yum repositories in /home/Server bcoz i dont have enough space in /var/ftp/pub. i installed vsftpd ,createrepo rpms and index is installed, but when i check for yum list its saying cannot change directory.
I can't reach my website via http. I'm not sure but I think I just need to unblock port 80. But I can't find where a firewall has even been installed on my machine. ufw status returns inactive. sudo aptitude search firewall shows nothing installed.
Nslookup mydomain.com returns the correct IP. Pinging works.
But typing in the domain name or IP through the web browser just results in a "Network Timeout...Taking too long to respond."
Wget just hangs looking for MySiteName.com:80
VirtualHost has been set up and apache restarted. Site works fine with the ServerAlias I have assigned in my hosts file.
I am creating this script which will login to a server with ssh and check if a particular exists there, if not it will create the user.This is the script:Quote:
I need to recreate in a local folder called /distro/fedora/ the full directory tree (including eventually hidden files, symlinks, etc.) contained in the .iso file just downloaded (Fedora-15-i686-Live-Desktop.iso).
I understand I can mount the ISO image using something like this:
mount -ro loop /path/to/image.iso /mnt
but then, which would be the best way to get a copy exact of what I see underneath /mnt in to /distro/fedora ?
I just tried FreeNX. I work great. I am thinking about uninstalling the vino/vnc on my machine.
However, I'd like to know if FreeNX can access the session that open locally on the server. I tried session 0 and 1, none of them can access the local session.
For default vnc, the connection will let you access the local session on the server. Can FreeNX do that?
i was trying to configure yum locally, can i copy files to any other location other than /var/ftp/pub. how to configure yum.repos.d/rhel debuginfo file.
I just switched from Windows to Linux. I've been using EditPlus for many years mainly because of it's ability to save locally, and then send the file via FTP, with easy keyboard shortcuts (ctrl-s to save, ctrl-alt-s to ftp).
I also need syntax highlighting and basic code editing features. Is there anything for Linux that can do this? I don't want to run EditPlus via Wine
I need to save locally and remotely simultaneously, or at least with a few keystrokes. I already know of plenty of ways to edit remote files.
Is there an open source application that can download e-mails from a generic POP mail server, keep a copy of the mails locally and then deliver copies to multiple accounts on a LAN? I have a friend who uses a group e-mail account, and more than one person is always hooked onto that account. The problem is they cannot leave e-mail on the server, as it eats out their webhosting space, but if someone downloads a message in Outlook, the other users do not see that message.
I am installing a program on a server as a non-root user. Specifically it is tmux 1.5, but this should apply broadly to all locally installed program in my opinion (I mention the program name in case this problem ends up not being my own error).
The program requires me to install some dependent libraries (e.g. libevent and ncurses). So, I installed them both locally since I do not have root access
cd $HOME/library/installation/folder DIR=$HOME/local ./configure --prefix=$DIR #... make ... make install
[Code]....
Ok, so this installs the program without problems into $HOME/local/bin, but if I run the executable: $HOME/local/bin/tmux , I get the following error:
tmux: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
It would seem to me that the program cannot find the desired libraries, but the file libevent-2.0.so.5 does indeed exist in $HOME/local/lib as specified in the configure options. I am wondering how I can get the program to recognize the installed library in order to run. I tried putting symbolic links in $HOME/lib, $HOME/bin, and $HOME/local/bin, but none of these worked.
What I'm trying to do is to grant my regular user to locally mount partitions and shutdown the machine without a password. Here is what I've done to /etc/sudoers:
Code:
Host_Alias LOCAL = localhost Cmnd_Alias SHUTDOWN = /sbin/shutdown Cmnd_Alias MOUNT = /bin/mount, /bin/umount <my_username> LOCAL=(root) NOPASSWD: SHUTDOWN, MOUNT %wheel ALL=(ALL) ALL
My user is a member of wheel group and I want to type the password for each sudo command except for shutdown and mount. However I am asked for a password whenever I execute "sudo mount [...]" or "sudo shutdown [...]".
i have been using samba to gain access into windows computer through my pc which has fedora 8 ..can i access the unix machine from another unix machine? is yes then what is the procedures ?
I set all of my family members up with Linux Mint so that their computers would stop punching themselves in the face, but I'd like to be able to control those computers when my mom calls up and wants to know how to "put her favorites in the drop box." I've got Parallels with WinXP, and Ubunutu VMs, so my OS isn't really a concern (although I'd prefer to use OS X if there was a slick GUI app). What's the best or most practical approach to getting access to these computers from across the country?
I am using some software that uses CUDA to run some stuff on the GPU.
If I am using ssh to connect to the box, or vnc even, and I try to run the program I get an error that no CUDA device is enabled. I have to go over to the machine and physically log in, and type "startx" to get it to detect the device. It can also be another use on the box using an X session, but one has to be started soemwhere on the box to get CUDA working. Is there a way to "startx" over an SSH session so that this will work and I dont have to go over and log in?