Tag Info

New answers tagged

0

This appears to work: ssh -t localhost "echo '. /dev/fd/2'|sudo bash -sil 2<<\FILE PS1='my prompt : ' exec 2>/dev/tty exec </dev/tty FILE " [sudo] password for mikeserv: my prompt : id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),19(log) my prompt : sudo will close all file descriptors but ...


2

sudo -i runs a login shell as the target user. The rest export PS1... would only be executed after that shell has terminated. Also, your ~/.bashrc is likely to override PS1 to passing it in the environment will probably not help. You could try: ssh -t host 'sudo env PROMPT_COMMAND="PS1=\"Remote! \W: \" unset PROMPT_COMMAND" bash -l' ...


0

If you would rather use a GUi then you can install VNC in the same manner as ssh see Volker's answer for command. Tightvnc Server is a nice light choice. Of cause this assumes your virtual Ubuntu has a DE installed. If you want to see what packages are available use apt-cache search string


0

If ssh is installed, it works by default for non-root users I think. If you find any other such a way to connect that is open by default, let us know, so we can report it as a bug. :) For 'ssh' to work, you need the package openssh-server. The remaining question is whether that is installed by default. I did not check, but I woud expect that it is not ...


0

I've tested Terminator (on Ubuntu) against an AIX machine using ssh and the terminal resize works correctly. AIX reported $TERM as xterm. It appears either rsh is not sending the proper control sequences when Terminator resizes the terminal, or rshd is not handling them properly at the AIX end (assumption, untested). In any case, I recommend using ssh!


9

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 ...


1

The IP of the host mail.mydomain.com is sending too many mails, unsolicited emails which is worse, too fast. This is clear from the error message: Our system has detected an unusual rate of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 ...


0

You could use a ProxyCommand with SSH. In your ssh config (~/.ssh/config): Host remotehost.com ProxyCommand ssh user@jumphost.com -W %h:%p Then execute the command: ssh remotehost.com 'shellscript.sh'


1

OK, I have found the solution in my case. I am indeed using the suggested while loop. It now looks like this: while ! \ rsync -aiizP --append --stats . -e ssh user@host.com:./path/rfiles ; \ do now=$(date +"%T") ; echo · Error at $now · ; sleep 5 ; done Without the while loop, I would have to manually start the rsync again. Now, it works just like a ...


2

If you try to solve this problem at the level of the file copy tool, rsync is as good as it gets. Be sure to use the options -au, so that rsync won't try to synchronize the same file multiple times. Rsync will make progress as long as it's able to at least exchange the file list and transfer one file fully before being interrupted; if you can't ensure that, ...


2

The main problem with rsync that it can't continue induvidual files. If you are copying a complex directory structure, it is okay, but if you want to copy for example a single dvd image, it won't be robust. For such cases I use wget. More precisely, wget -c -t 0 -T 10 http://.... Especially interesting is the 20 sec timeout, which resolves the common ...


3

I would definitely suggest rsync. I use rsync to copy files anytime I think that the connection has any possibility of being interrupted. If the copy fails, I know I can simply start it again. It's easy to put it in a while loop if you need it to automatically restart until it succeeds.



Top 50 recent answers are included