General :: Use Ssh And Run Command In The Remote Machine Using Shell Script?

Apr 27, 2011

How can i do that.. Today is my first day writing a script.. and correct me if this Thread should be somewhere else..

Code:

if [ $1=$anyvariable ]; then
ssh www.a.com <Have to set few variables and give commands >

View 8 Replies


ADVERTISEMENT

General :: Run A Remote Command On A Windows XP Machine?

Jun 24, 2011

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?

View 4 Replies View Related

Ubuntu :: Ssh And Run Command On Remote Machine?

Jan 8, 2010

I have made a shortcut on desktop and want that one to ssh from machineA to machineB and run a command.I have fixed the .pub file so I can ssh without password.This is what I want to doPHP Code:ssh -X user@machineB && start-the-program ..but it seems to not run the command after "&&".How can I do to make it automaticly run a command after it has connected over ssh?

View 5 Replies View Related

Software :: Executing The Command On The Remote Machine

Oct 5, 2010

If I type this manually on the command line, it works

Quote:

ssh -Y user@machine 'firefox &'

I ssh into the remote machine as the named user and pop an instance of firefox from that machine back to my own. If I put the same thing into a shell script though, it fails.

Quote:

#!/bin/bash
ssh -Y user@machine 'firefox &'

I'm just left sitting at a command line on the remote machine. Why does the script fail and how can I make it work?

View 4 Replies View Related

General :: Transfer Files On A Machine With Ftp / Sftp And Scp Disabled Onto A Remote Machine?

Nov 30, 2010

How do you transfer files on a Linux machine with ftp,sftp and scp disabled onto a remote machine

View 2 Replies View Related

General :: A Shall Script For Remote Shell Execution?

Mar 26, 2011

i need to take the backup some folders encryption formate with password i used gpg encription in the script but it is not taking the password it throos errorthe syntax is#!/bin/bashtar -cvzf test.tar.gz target ; echo "test" | gpg -c test.tar.gz --stdin

View 3 Replies View Related

General :: How To Remote Shutdown A Win XP Machine

Feb 10, 2010

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)

View 4 Replies View Related

General :: Ssh - Remote Desktop Into A Machine?

Mar 19, 2010

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.

View 3 Replies View Related

General :: Can't Ssh Remote To Fedora 14 Machine?

Feb 28, 2011

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.

login as: xxxxx
xxxxx@xx.xx.85.216's password:
Access denied
xxxxx@xx.xx.85.216's password:
Access denied
xxxxx@xx.xx.85.216's password:

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.

View 3 Replies View Related

General :: Find The Remote Machine Name?

Aug 14, 2009

I want to access the remote machine I already login, but I forget the machines name, how can I find the machine name then?

View 3 Replies View Related

General :: Remote Command Execution Via SSH And Newgrp Command?

May 9, 2011

Up until now I've been using plink to remotely compile a project I'm working on. But recently the administrator from the remote server updated the distribution and messed up some configurations. My project has a lot of scripts written for tc shell (tcsh), and now the default shell is bash. There is no way to change this. Another problem is that now I need to run newgrp to change my default user group.

So... to work around this problem I've changed my .bashrc to run newgrp and then tcsh. If I do a normal connection using SSH, everything works as expected, but when using plink, or SSH to remotely execute commands, the shell gets stuck on the newgrp command. I think it's because both applications need a return value from newgrp to send the command I need to execute. Remotely running scripts that call a shell also get stuck like newgrp (newgrp also opens a new shell and that's why it gets stuck) my .bashrc is as follows:

Code:

user_grp=`id -g`
if [ $user_grp != 4919 ]; then
newgrp new_group_id
else

[code]....

View 4 Replies View Related

General :: Check If Remote Server Is Up - Shell Script?

Sep 10, 2010

I need to add something to an existing shell script that will check whether a remote server is up or not.basically (but I can't figure it out) :-

if [ -the server to check- ] ; then
echo "Server is Up"
else

[code]....

View 12 Replies View Related

General :: Detect Remote Logins Within Shell Script?

Apr 19, 2011

I've written a shell script that among other things, restarts network services. As such, I'd like to keep those who are remoting in via putty, etc. from executing the script. Is there a way to detect this and restrict running the script (by adding additional coding in the script) that disallows running it from unless you are logged in directly to the machine? It's written in bash.

View 1 Replies View Related

General :: Move A Process From One Shell To Another (local To Remote)?

Jan 28, 2010

Is is possible to move a process from one shell to another (local to remote)

e.g.

if
my_code.sh &
#jobs
[1]- Running my_code.sh &

was started on one remote shell is it possible to move it to the foreground on another shell as root or another user?

View 5 Replies View Related

Software :: Put Ssh Into Remote Machine - Error Write Failed: Broken Pipe (After Logged Into That Machine)

Jul 18, 2011

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.

View 1 Replies View Related

General :: Installing CentOS On Remote Machine?

Apr 15, 2010

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?

View 2 Replies View Related

General :: Connecting To Remote Windows Machine

Jun 19, 2010

Like ssh for linux,is there any way to connect to remote windows machine.

View 3 Replies View Related

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.

View 6 Replies View Related

General :: Ftp To Remote Machine (solaris) From Windows Box?

Jan 20, 2010

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

View 8 Replies View Related

General :: Remote Assistance Between Machine And VISTA?

May 18, 2011

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.

View 4 Replies View Related

Software :: Redirecting Remote Machine Audio To Local Machine?

Dec 26, 2009

Is there any way to redirect a remote Linux machine mplayer output audio to local one?

View 2 Replies View Related

General :: Delete A File On A Remote Server Using Shell Scripting?

Jul 18, 2010

delete a file on a remote server using shell scripting.

View 14 Replies View Related

General :: Transfer File From Local Mac To Remote Machine

Aug 12, 2010

How do you transfer a file from a local Mac to a remote Linux machine

View 5 Replies View Related

General :: Transfer Files From Remote To Local Machine Using SSH?

Jun 28, 2011

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:

rsync -azvv -e ssh /home/path/folder1/ remoteuser@remotehost.remotedomain:/home/path/folder2

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.

View 2 Replies View Related

General :: Shell Script That Logs Into Another Machine And Executes Some Commands?

Jan 5, 2011

I am trying to write a script that connects to a server and executes some commands on there. Something like this:

#!/bin/sh
telnet remote_machine
cd /home/some_directory
cat a_file_in_current_directory

Unfortunately after login/password I guess the script doesn't jump past the telnet command, until I exit. What do I need to do to make the script start executing commands in the remote shell?

View 1 Replies View Related

General :: Playing Music From Remote Server On Local Machine Via SSH?

Oct 26, 2010

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.

View 4 Replies View Related

General :: Display The Source Machine During A Remote X Session In The Title Bar?

Aug 8, 2011

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?

View 1 Replies View Related

General :: Make A Remote Access From A Ubuntu To A Windows 7 Machine Using RDP?

Aug 11, 2011

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?

View 1 Replies View Related

General :: Open A Second Shell Session That Will Remember The User, Machine, And Directory

Sep 21, 2010

I'm ssh'ed into a machine and logged in as a different user. Is it possible to open a few new windows that will still be ssh'ed into that same machine, still logged in as that user?

View 2 Replies View Related

General :: Secure Remote Desktop Of Ubuntu On Windows Machine On Different Network?

Oct 22, 2010

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?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved