Tag Info

Hot answers tagged

30

The linefeed character (also known as newline or \n) is the one that when sent to a terminal tells the terminal to move its cursor down. Yet, when you run seq 3 in a terminal, that is where seq writes 1\n2\n3\n to something like /dev/pts/0, you don't see: 1 2 3 but 1 2 3 Why is that? Actually, when seq 3 (or ssh host seq 3 for that matter) writes ...


7

If you look at the Wikipedia page on the subject there are several apps mentioned. Xmove excerpt xmove is a computer program that allows the movement of X Window System applications between different displays and the persistence of X applications across X server restarts.[4] It solves a problem in the design of X, where an X client (an X ...


6

You can exclude local.dev from ProxyCommand, using ! before it: Host * !local.dev ProxyCommand /usr/local/bin/corkscrew 127.0.0.1 8840 %h %p From ssh_config documentation: A pattern entry may be negated by prefixing it with an exclamation mark (`!'). If a negated entry is matched, then the Host entry is ignored, regardless of whether any ...


6

You need to use single quotes instead of double quotes to prevent shell expansion before your command is passed to a remote server. BTW, $( are now preferred over ` in command substitution. Unless you use shell that only supports ` consider using $( in command substitution. See here for more details.


5

You could pipe through SSH. Example using dd: dd bs=1M if=/dev/disk | ssh -C target dd bs=1M of=disk.img If the network connection breaks during transfer, you can resume if you know how much was copied. For example if you're sure at least 1000MiB were transferred already (check the file size of disk.img): dd bs=1M skip=1000 if=/dev/disk | ssh -C target ...


5

As mentioned in the comment, you're using an encrypted home directory, and are likely using pam_mount to mount it. pam_mount mounts the partition using the password acquired during login. Since you're trying to log in via ssh public keys there are 2 issues: There is no password being sent during public key authentication, so it can't mount your home ...


4

When using that method to copy the file the files appear to be different. Remote server ls -l | grep vim_cfg -rw-rw-r--. 1 slm slm 9783257 Aug 5 16:51 vim_cfg.tgz Local server Running your ssh ... cat command: $ ssh dufresne -t 'cat ~/vim_cfg.tgz' > vim_cfg.tgz Results in this file on the local server: $ ls -l | grep vim_cfg.tgz -rw-rw-r--. 1 ...


3

An option in the config file is applied the first time it matches. Since you don't have any ProxyCommand in the host entry, the one in your * entry will be used. There are two ways to get around this: For the hosts where you don't want to use the proxy command, simply add the line ProxyCommand none For the * entry, note specifically that the ...


2

I'd install the buffer program (if it is not already there in your distribution) if you are trying to transfer via an ethernet link. It is like dd but FAR better and faster. Basically it is programmed to do concurrent reads and writes using a shared memory buffer. I used to use this for tape dumps and it saved about 10% transfer time. The command line ...


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


2

Was it wrong for me to suddenly log out like that? Generally speaking, you don't want to suddenly stop the install process, as it leaves your file system in a somewhat undefined state. If you can get access to the console (either by ssh or directly) then try to repair the installation by typing: sudo dpkg --configure -a sudo apt-get install -f How ...


1

The professional approach is to equip systems with specific hardware that allows out-of-band management, a solution to access and manage the server when normal remote management fails (i.e. when SSH fails or RDP sessions can't be established). Solutions differ from KVM (over IP) that connect the systems USB port and graphics cards to IPMI and built-in ...


1

When you do: ssh serva -t "source ~/.bashrc" ssh tells sshd to invoke the login shell of the remote user as: the-shell -c 'source ~/.bashrc' That tells the-shell to run that command and exit. Probably, what you want is to run an interactive shell and have that interactive shell to run that source ~/.bashrc command and then to issue a prompt and read ...


1

Generally speaking, it's usually safe to rerun the update. Assuming you are using a standard Linux.... The following logs are related to apt (and thereby to upgrade): $ ls /var/log/apt/ | grep 'log$' history.log term.log and also /var/log/dpkg.log Lastly, from this post it seems that hard reboot (i.e. disconnecting the power) will allow you to log ...


1

When the current session is destroyed, any applications running in it are also killed. To prevent this, use nohup as so: sudo nohup apt-get update & or sudo nohup apt-get install --yes package & This will run in the background immediately return you to the prompt after you run it. The second version will automatically answer yes to any ...


1

For me I needed GSSAPI and I didn't want to turn off reverse DNS lookups, that just didn't seem like a good idea so I checked out the man page for resolv.conf. It turns out that a firewall between me and the servers I was SSHing to was interfering with DNS requests because they weren't in a form that the firewall expected. In the end all I needed to do was ...



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