Tag Info

Hot answers tagged

38

OK, I've just found it, and it still works! Really funny. You don’t need any fancy applications, instant messengers or the like. With this command you send your audio to the remote host. arecord -f cd -t raw | oggenc - -r | ssh <user>@<remotehost> mplayer - Or if you like ffmpeg better ffmpeg -f alsa -ac 1 -i hw:3 -f ogg - \ | ssh ...


17

SSHFS is wonderful; it can mount remote directories in a local directory. You could install ssh on both sides: # apt-get install ssh On the client side, or both sides if desired, install sshfs and fuse utilities: # apt-get install fuse-utils sshfs Without reboot, load the kernel module: # modprobe fuse Create a mount point for the remote file ...


16

If your intent is to backup a remote computer's HDD A via SSH to a single file that's on your local computer's HDD, you could do one of the following. Examples run from remote computer $ dd if=/dev/sda | gzip -1 - | ssh user@local dd of=image.gz run from local computer $ ssh user@remote "dd if=/dev/sda | gzip -1 -" | dd of=image.gz Live example $ ...


15

Has been an issue with firefox for quite a while, try running firefox as firefox -no-remote (setting MOZ_NO_REMOTE=1 as environment variable should work as well). Here's more info


13

You can use X11 forwarding over SSH; make sure the option X11Forwarding yes is enabled in /etc/ssh/sshd_config, and either enable X11 forwarding by hand with ssh -X remoteserver or add a line saying ForwardX11 yes to the relevant host entry in ~/.ssh/config Of course, that requires a working X display at the local end, so if you're using Windows ...


11

You'll need to download the content of the script in some way. You could do ssh remote-host cat script.bash | bash But that would have the same kind of problem as: cat script.bash | bash namely that stdin within the script would be the script itself (which could be an issue if commands within the script need to get some input from the user). Then, a ...


10

You may find useful xinput list and xinput test <device>. For example, $ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)] ⎣ Virtual core keyboard id=3 ...


10

One simple way is to turn on vnc screen sharing by going to System Preferences -> Sharing -> Screen Sharing on the machine you want to share. For client compatibility reasons you may need to select both "Anyone may request permission to control this screen" and the "VNC viewers may control this screen with a password" checkboxes. Once you've set up the ...


10

rsync is able to do this. rsync --ignore-existing <src> <dest> You can perform also various kinds of updates. Just have a look at the man page.


10

In a screen or tmux session, set up a shell that will reverse your changes after a delay. I don't know anything about iptables, so can't help with that, but something like this has saved my proverbial bacon on numerous occasions while altering live firewall configs on FreeBSD: # In one `screen` or `tmux` window % sleep 60 && <command to reverse ...


9

You can use plenty of things, among which, popular options are: NFS Samba / CIFS SSHFS By ease-of-setup I think they would have to be put in this order (top: easiest) SSHFS Through FUSE, you can mount remote filesystems via ssh. I won't cover how, as Cristopher has already very well explained that. Just note that, in order to mount the file ...


8

The reason you are not getting the correct error code is because local is actually the last thing executed. You need to declare the variable as local prior to running the command. local RESULTS RESULTS=$(ssh user@server /usr/local/scripts/test_ping.sh) echo $? You can see the issue here: $ bar() { foo=$(ls asdkjasd 2>&1); echo $?; }; bar 2 $ bar() ...


8

No packets are received for several seconds and then ~6 are sent back in quick succession. This is symptomatic of two similar phenomena: network congestion or network discards (usually due to congestion). In the first case, a router between here and there has a burst of traffic unrelated to your activities which cause your traffic to be buffered in ...


8

If you can install software on your work computer, then you could install win-sshfs and a ssh client such as PuTTY on your Windows machine. You can then ssh into the remote Ubuntu server to run LaTex and create your files, after which you could use win-sshfs to access those files from the Windows machine. This way, you'd only need the one ssh port open on ...


8

You can mount the remote directory with sshfs, after that, the file is accessible in your local directory tree. Example: sshfs user@domain:/remote/directory/ /local/directory/ It's all in the man pages. Or just copy the file over with scp/rsync, edit it, and copy it back.


7

There is no standard per-user file that is run for non-interactive logins. You need to either make the program self-contained, so that it's able to find its dependencies without relying on non-default environment variables, or else explicitly set the environment, typically with ssh somehost '. ~/.profile; exec ~/some/path/somescript.py' You shouldn't be ...


7

First, the easy way: rsync has a --bwlimit parameter. That's a constant rate, but you can use that to easily throttle it down. Now, if you want the adaptive rate, there is the linux traffic control framework, which is actually fairly complicated. There are several references I'm aware of: Linux Advanced Routing & Traffic Control Traffic Control HOWTO ...


7

If you want to run a X command on a remote system and and show the client on your local system the solution is rather simple: You have to ensure that your X Server accepts connection via TCP, nowadays this is typically disabled as it is a security problem. You basically have to run your Xorg server without the -nolisten tcp option. For gdm3 you can add ...


7

Most of the time you will use ssh. vncviewer might be available, but often it isn't (most servers will not have X11 or anything graphics-related). Why use SSH? From the CentOS documentation: After an initial connection, the client can verify that it is connecting to the same server it had connected to previously. The client transmits its ...


7

You can do this using WebDAV. This is an HTTP extension that is supported by most web servers, including IIS and Apache. WebDAV can be mounted in linux via the davfs2 FUSE module.


7

This can be done by installing Cygwin and an openssh server on your Windows machine. Cygwin will come with bash, which can run your script, and openssh can be installed under Cygwin, and will allow you to login to the Windows machine remotely. Before logging in, you can transfer your script to the Windows machine using scp, and then run it directly with ssh. ...


6

What you have is not a unix command line, what you have is an FTP session. FTP is designed primarily to upload and download files, it's not designed for general file management, and it doesn't let you run arbitrary commands on the server. In particular, as far as I know, there is no way to trigger a file copy on the server: all you can do is download the ...


6

If I had to make an educated guess about what's going on here, I'd say that firefox first looks for an open firefox window before launching, and if that exists sends it a message using X to just start a new browser window. Because the remote system is using your local display, whatever it uses for detection is picking up the local window. (This would also ...


6

This line is printed by the shell. Different shells implement looking for mail in slightly different ways, but unless can count on people to configure their shells to your liking (and possibly pick a different shell), you need to send them mail. Good shells designed for interactive use have a way to run arbitrary commands before displaying a prompt, in ...


6

I would say the answer is maybe but I wouldn't do it and I would STRONGLY recommend you DO NOT TO ATTEMPT IT. The idea is fairly simple but requires perfect execution which Murphy's Law will mess up. If your hardware has PXE boot and another Linux machine on the network where your server resides you can set up a Network Boot Environment wipe your MBR on ...


6

Beside solutions with sudo, that can be script-friendly be configured (no extra password-prompt for specific commands) or setuid solutions which are not easy to do secure, I suggest the usage of ssh public-key authorization with the command= restriction. For this, you need to enable password-less login to the root user if not yet done (PermitRootLogin ...


6

I'm exactly sure about what you are looking for. But to launch a new application inside a running X server you can use for example: DISPLAY=":0" mplayer -fs video.ogg You can choose the id of the X server, and you may add an optional screen identifier like :0.1 to launch the application in screen number 1.



Only top voted, non community-wiki answers of a minimum length are eligible