Ubuntu Networking :: Bash Script Over SSH On Remote Server
Dec 8, 2010
I've been trying to set up guake to automatically open 2 programs in two different tabs via ssh on my remote server. I have succeeded in doing this, however whenever the last command is run the terminal tab locks up and I can't enter any input, the only command that works is ctrl+c to kill (in this case) iptraf. I think it might be something to do with how I'm sending my ssh password using echo and pipe. This is my script:
Code:
#! /bin/bash
# script to launch multiple guake windows on Network21 local server
guake --rename-tab=Htop21 --execute-command="ssh -t 192.168.1.137 'htop'" &
sleep 5 &&
guake --new-tab=2 --rename-tab=Iptraf21 --execute-command="ssh -t 192.168.1.137 'echo password | sudo -S iptraf'" &
The first and second commands always work, whilst the last one loads iptraf then the cpu maxes out and i can't enter anything unless I kill the program. I've also tried nload and a couple of others, with the same results.
View 6 Replies
ADVERTISEMENT
Jan 10, 2011
I'm hoping to set up a cron job that takes a file and copies it to a remote password protected FTP server. I've got a command that formats the file with the correct name and I've put it in the anacron file in /etc/cron.d (which I think is right, haven't tested it yet).I'm not sure how to copy the file to a remote server though. I do actually have the ftp server bookmarked in my places menu. So is there a simple way of suppling a file path that will put it straight into that folder? The only problem I can see with this is that the connection won't be open continuously, so would need to be re-opened when needed (I could presumably save the password in the keyring so that I don't need to be there to type it in).
Or maybe set up a cron job that connects to and mounts the ftp server a minute before it has to copy the file over?
View 9 Replies
View Related
Sep 7, 2010
I have installed Ubuntu Server (lamp+openssh) on a laptop in order to use it as a testing web server for my projects. After configuring it I've also installed the GUI to make things easier as I'm not very proficient using just the command line.
I'm using the wireless connection on the laptop to communicate with the router and my main desktop (Windows). I've assigned it a static local IP (192.168.1.99) in order to be able to access the sites on my web server from my desktop, and everything works fine.
Now comes my problem: I need to be able to access those local sites from a remote location (outside of my local network) as well. How can I do that?
View 4 Replies
View Related
Mar 29, 2011
We have installed Ubuntu Server 10.04 LTS for file share (Samba) at our local network.
I want to access my local server (Local IP 192.168.1.200) via internet from remote location. I have already installed SSH on our ubuntu server. I understands that using "Putty" we can access our server. Furhter, our Internet IP is dynamic (which is not an issue for us).
View 3 Replies
View Related
Jul 9, 2011
I want to get all the directories from a remote server using ftp. I know how to use mget for files, I would like to know if there is a similar way to get the whole directory with the files included obviously.
View 1 Replies
View Related
Jun 16, 2010
I'd like to administrate my parents' computer over the Internet. When I google for a tutorial on what I have to install and configure on my and their PC, I always end up with tutorials on servers and the like or tutorials for a connection between Ubuntu and Windows.
Does anyone know of an easy tutorial for remote desktop when two private, simple (Ubuntu-installed) PCs are involved?
View 1 Replies
View Related
Jun 27, 2011
I have Ubuntu 10.4 Server, it's a local intranet server in back of a router in a "standard" home network. As I understand it laptops, PCs and the server are "hidden" from direct contact with the internet by Network Address Translation [NAT]. The router is a Linksys WRT54G all clients are connected to it, and the router itself is connected to a modem provided by the ISP. The server was given a static IP address. To admin the server I connect from a local client with SSH and get a command-line.
Is there a way to admin the server if I am a thousand miles away from this local network? Putting it another way, Is there a way to "tunnel" through to the server, give the user/pw and get a command-line from the internet? What software or hardware is needed?
View 1 Replies
View Related
May 2, 2011
how to configure remote server....and how many maximum user loging remotely
View 8 Replies
View Related
Apr 30, 2010
I cannot access a remote server(Ubuntu) using ssh or even using sftp from my ftp client. I've been accessing this server regularly for many months with no problem until now. There is a web server running and that's OK, so no problems there. I asked the owner of the server if he could access using ssh from within his LAN, which he could! So openssl is working from within the LAN, but not ouside of the LAN. I access the remote server by using one of [URL] free domain names. I'm aware that this service requires renewal or activity at least once a month and as far as I know this is up to date and working OK.
Is this a router gateway problem? I suspect that port 22 has been blocked, but what could block this port? It's been working well for so many months. As far as I can tell the owner of the server/LAN has not been tampering with the router, so what could be blocking port22? I'm currently accessing the server using vnc4server.
Another really weird thing is that when I access the terminal on the remote server via vnc4server and I ssh back to the server using one of [URL] free domain names, it works! So as I understand ssh is accessing itself by going out of the LAN and back to itself. This would suggest that port22 on the gateway router is working. But when I try to ssh from a pc outside of the LAN, I just get timed out!
* openssl working from within the LAN but not outside of the LAN.
* sftp not working.
* domain name from dyndns.com working and up to date.
* Web server is working OK.
View 14 Replies
View Related
Dec 12, 2008
I'm putting a new system in my wife's classroom that I would like to be able to maintain remotely. I won't be able to ssh into the system becuase it is on a highschool network that I have no control over. I have a VPN running at home so I could setup the system to connect to that, but I'm not sure how reliable that is plus I will then probably have to setup two NICs so that the system can also be present on the school network. Seems to add complexity and possible problems.
Are there other options here? I will do the research, I just need a starting place.
View 6 Replies
View Related
Jul 27, 2009
I install one server in my system(linux 5.0) and accessing that server through the 127.0.0.1 private ip address(lo). While i connect to a remote server for validating registry it gives me the error and unable to connect to remote server. here some of the files i give here in below to know my system network configuration
/etc/hosts
------------
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
127.0.0.1 cp.softidsolutions.org
[code]....
View 5 Replies
View Related
Mar 22, 2010
I'd love a hint or two on the following problem. I've set up iptables rules to forward all connections to port 3306 to a non-standard mysql port on a remote server. This works, except that I need to deal with the loopback interface in a special way and I'm stuck.
Code:
iptables -t nat -A PREROUTING -p tcp --dport 3306 -j DNAT --to 128.XXX.XXX.XXX:3197
iptables -A FORWARD -p tcp -d 128.XXX.XXX.XXX --dport 3197 -j ACCEPT
iptables -t nat -A POSTROUTING -j MASQUERADE
Since locally-generated packets will never hit the PREROUTING rule, you'll need to setup a near identical rule using OUTPUT to make it work. Here is what I've tried:
[Code]...
View 4 Replies
View Related
Oct 11, 2010
Well I guess the topic says it all. I've recently upgraded to Maverick from Lucid all went smoothly until i restarted and realized that the remote desktop server included stopped functioning all of a sudden. tried other vnc servers with no luck.
View 9 Replies
View Related
May 16, 2011
New machine, need to append my id_rsa.pub to my remote SSH box, cannot use ssh-copy-id because I cannot specify the port I've got the machine running on.
View 1 Replies
View Related
Jul 14, 2011
i done desktop config in ubuntu server 11.04 and connected via tightvnc,uvnc and in remote desktop viewer from another ubuntu machine also. I am not able to access(connect) the server in GUI mode(when monitor is removed) but i putty is working fine in cmd line.
View 1 Replies
View Related
Jan 6, 2010
I am trying to set up a remote server on an old desktop that i have and i am running into problems. I have the packet installed but i can not get it to run. When ever I enter /sbin/service sshd start
I get Generating SSH1 RSA host key:[FAILED] and i can not for the life of me figure it out. Running fedora 12
View 2 Replies
View Related
Dec 6, 2010
I have Rechat FC4 with CUPS 1.45 and a Dlink DS-802 Print Server.
I have installed CUPS, and pointed it at the DS-802,
but no joy.
Windows already prints to the 802 via a W2k3 server, so that works fine. FC4 with CUPS seems to point at the 802 but print jobs from localhost (just go to the print queue, and there they stay.
Windows continues to function fine, but linux wont send to the 802. Also, if Windows users try to print to the CUPS shared printer, it shows "No Accesss".
View 1 Replies
View Related
Apr 13, 2011
I'm trying to make a cheap bash script that will log me into a remote terminal. When I run the script, it prompts me for a password. I'd like to include the password entry into the bash script. How do I do this?
View 2 Replies
View Related
May 10, 2010
I am trying to connect to a windows 2000 VPN server at work, with my current settings in DOES connect to the VPN and i can ping the domain server which is 10.1.1.2 but the first issue is i cannot ping the other computers on the network(via hostnames) can't remember the ip address of the other machines . second issue is when the connection is established and i RDP into 10.1.1.2 ok great i am connected to the server but any interaction in the RDP session even moving the mouse on the screen kills the session and the VPN connection fails.
Running Ubuntu 10.04 LTS 64Bit
Image of current settings in network manager:
Syslog:
Code:
May 11 12:08:04 oliver-desktop NetworkManager: <info> Starting VPN service 'org.freedesktop.NetworkManager.pptp'...
May 11 12:08:04 oliver-desktop NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.pptp' started
[Code].....
View 1 Replies
View Related
Feb 21, 2011
I'm setting up a computer with xUbuntu installed and wan't to run it as a PPtP VPN server.
I'm using a mobile broadband for internet connection, with DynDNS wich updates the host with public IP-address.
I've managed to set up the connections and installed the needed packages. The problem appears when I connect to the VPN server through another computer;
When I get connected to the VPN server the remote computer recieves an IP-address from the server (xUbuntu) wich is great! But the server changes prefered network, from the mobile broadband to the wired network wich results in the remote computer losing it's connection to the server.
View 1 Replies
View Related
May 4, 2011
I just remotely updated my uncle's Ubuntu 10.10 desktop to 11.04. My uncle has no computer skills, so it is very important that I troubleshoot his problems using VNC. After completing the 11.04 upgrade, I was not able to connect to him via VNC. After some fiddling around I was able to connect by turning off the confirmation option in the Security section. We are now using the password security option. The problem is that my uncle does not have any security against my peering eyes.
I tried reinstalling Vinagre, but that didn't help. Is it possible to get the confirmation option working again somehow?
Is there a download link for Vinagre 3.01 (deb)?
View 3 Replies
View Related
Jul 11, 2010
In the past, I've installed Internet services as daemons and as xinetd.d with no problems. Those approaches do not meet my needs. And, perhaps, nothing will.
- the service was converted from VB-6 to wxPython. It has a GUI which is accessed with either "remote desktop" or VNC.
- the wxPython service works on Windows and can be accessed from other hosts on my LAN
- the wxPython service works on CentOS and Fedora, but can only be accessed from within the server host. Even from other user-ids. But, I cannot get to it from other hosts.
- ipchains AKA firewall ports are marked for INPUT.
- The server host uses autologin to fire up a useid in group "user". I do not want it running as "root". the .bash_profile fires the service up.
- the service is heavily mult-threaded, and supports devices connected to serial ports asynchronously with the ephemeral port threads (all this works).
There are some programming solutions that I would rather not develop.
- a proxy service that runs under xinetd.d.
- separate the GUI code from the Internet and serial port code. Allocate a "control" port for remote GUI control. a'la SAMBA & SWAT
Is there any hope, that I can run it as is, by doing some network configuration stuff.
View 8 Replies
View Related
Mar 22, 2010
I'm trying to workaround a limitation in a server application. The limitation is that I can only connect to a LOCAL mysql database. I am trying to fool the server in to using a remote mysql database. I was hoping to do this by simply forwarding 3306 to another server on the same subnet.To that end I've set up iptables rules to forward all connections to port 3306 to a non-standard mysql port on a remote server. This works, except that I need to deal with the loopback interface in a special way and I'm stuck.
View 14 Replies
View Related
Dec 18, 2010
I have a openvpn server configured and users are using from remote location. I got some errors in the /var/log/messages file as:PHP Code:
Dec 18 16:09:37system openvpn[7221]: x.x.x.x:58983 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Dec 18 16:09:37 system openvpn[7221]: x.x.x.x:58983 TLS Error: TLS handshake fai
[code]....
View 1 Replies
View Related
May 27, 2010
configure nagios to monitor custom port on a remote linux server..
View 5 Replies
View Related
Dec 21, 2010
Some time yesterday, I lost the ability to ssh my remote server, or even visit any webpages it hosts.
I've explored hosts.deny, /var/log/secure and even turned iptables off to see if it would fix anything. To no avail. Here's what my ssh login attempt looks like:
Quote:
localhost ~ $ ssh -vv x.x.x.x
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
[Code]....
View 5 Replies
View Related
Dec 3, 2010
I am at a loss. I can not access my work remote desktop via the terminal server client on my wired box running Ubuntu 10.10. My wireless laptop is able to connect right away once I established the VPN connection. The VPN connection is established on both boxes with no problems.
When I tried the Terminal Server Client on my wired boxed, it says it can not establish a connection. Yet my wireless box gets connected immediately!
I check the /etc/dhcp3/dhclient.conf and the /etc/resolv.conf to see if there were any differences, but they are essentially the same. When I have the vpnc connection, they both recognize it and I am able to ping the IP address shown when I do a "ifconfig" on the terminal.
What can be the problem? Anything I need to configure on a wired computer versus a wireless one? What else can I check?
View 7 Replies
View Related
Sep 29, 2010
I have the following command that works Code: ssh root{at}IPADDRESS 'vim-cmd vmsvc/power.getstate 64 | grep Powered | awk "{ print $2}"' Which outputs the following text:- Powered on I would like to Append some text so the output is:- Ubuntu Server: Powered on Every different variation that I have tried ends up in an unexpected token.
View 1 Replies
View Related
May 26, 2011
I have created a simple web form which pokes a PHP script:
<form name="update" action="http://www.mysite.com/script.php" method="POST">
<input name="submit" type="submit" value="submit">
</form>
I can easily surf along to the URL [URL] and click the submit button which pokes script.php and everyone's happy. Automating this in iMacros or Selenium - no problem.
I want to automate this in a bash cron on the same server - preferably as a one-liner.
I *thought* something like this might work:
Code:
wget --spider --post-data="submit=submit" http://www.mysite.com/wget.html
or
Code:
curl -d "submit=submit" http://www.mysite.com/wget.html
and many variations thereof but no luck.
Is there ANY way I can click the submit button from a Bash command line? Curl, wget, lynx - one of these simply MUST be capable of this.
I do not want to run script.php from the command line - there are loads of relative links etc.
View 14 Replies
View Related
Jun 25, 2011
I want to be able to synchronise files between 2 remote computers in both directions. Say for example that I want to synchronize my /home/Documents directory with <username>@example.com:/home/Documents What's the easiest way to update the folders in both directions, so that new/updated files on my home computer get transferred to the remote computer, and new/updated files on the remote computer get transferred to my home computer?
View 2 Replies
View Related