Hot answers tagged

44

You need to pass a literal escape to scp to avoid the remote machine treating * as a glob (notice that it is doubly quoted): scp 'SERVERNAME:/DIR/\*' .


35

VirtualBox will create a private network (10.0.2.x) which will be connected to your host network using NAT. (Unless configured otherwise.) This means that you cannot directly access any host of the private network from the host network. To do so, you need some port forwarding. In the network preferences of your VM you can for example configure that ...


34

Using the GUI See this SO Q&A on how to do exactly what you want, titled: Convert PEM to PPK file format. excerpt Download your .pem from AWS Open PuTTYgen, select Type of key to generate as: SSH-2 RSA Click "Load" on the right side about 3/4 down Set the file type to *.* Browse to, and Open your .pem file PuTTY will auto-detect everything it needs, ...


23

Mouse scrolling and elevators will work if you enable them in your .screenrc. Screen FAQ Q: My xterm scrollbar does not work with screen. A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate ...


23

after you reattach a ctrl-a F runs the "fit" command to resize the current window. if you reattach using the -A option it should resize all windows when you reattach. Are there others still attached to the screen session when you are attaching? For instance, are you having to use -x to reattach instead of -r? you can detach others when you reattach with "...


21

OpenSSH is the de facto standard implementation of the SSH protocol. If PuTTY and OpenSSH differ, PuTTY is the one that's incompatible. If you generate a key with OpenSSH using ssh-keygen with the default options, it will work with virtually every server out there. A server that doesn't accept such a key would be antique, using a different implementation of ...


19

Figure out exactly what escape sequence your terminal sends for Ctrl+arrow by typing Ctrl+V, Ctrl+arrow in insert mode: this will insert the leading ESC character (shown as ^[ in vim) literally, followed by the rest of the escape sequence. Then tell vim about these escape sequences with something like map <ESC>[5D <C-Left> map <ESC>[5C <...


18

I found Patrick's advice to be correct, although Chris's answer got me on the right track. Use quotes and then you don't need the backslash before the asterisk. scp 'SERVERNAME:/tmp/file_num\*' . scp: /tmp/file_num*.csv: No such file or directory scp 'SERVERNAME:/tmp/file_num*' . judgments_for_job_171642.csv 100% 32KB 32.0KB/s 00:00 ...


18

Try using the ssh connection termination escape sequence. In the ssh session, enter ~. (tilde dot). You won't see the characters when you type them, but the session will terminate immediately. $ ~. $ Connection to me.myhost.com closed. From man 1 ssh The supported escapes (assuming the default ‘~’) are: ~. Disconnect. ~^Z Background ssh. ~#...


16

Try enabling keep-alives. This causes PuTTY to send SSH null packets to the remote host periodically, so that the session doesn't time out. There are other things that can cause connections to drop, but this is worth a try. If it doesn't work, you'd need to look into these other things: VPN timeouts, router timeouts, settings changes on the remote SSH ...


16

Change the character translation in PuTTY to UTF-8.


16

Use the PSCP tool from the putty download page: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PSCP is the putty version of scp which is a cp (copy) over ssh command. PSCP needs to be installed on your windows computer (just downloaded, really, there's no install process). Nothing needs to be installed on the school's servers. PSCP and ...


15

Most Linux distros have putty available for Linux. You could install putty on the Linux side and use puttygen to convert the .ppk files to the regular ssh style key files (called PEM files - even though they don't get a .pem in the file name). puttygen id_dsa.ppk -O private-openssh -o id_dsa NOTE: You can also use puttygen to import ssh style PEM files ...


11

This is most likely a firewall which cuts your idle connection after a while. You can configure the openssh server or client to send a KeepAlive after a while. Send a KeepAlive every 5 minutes to the server: ssh user@server -o ServerAliveInterval=300 If you have control over the openssh-server, you can also send KeepAlives to the client after a defined ...


9

Another thing to check is if your system is setting the environment variable TMOUT. To check this you can just do: env | grep TMOUT or echo $TMOUT If it is set, you could change it or unset it. To change the value: export TMOUT=3600 Where the number is the number of seconds until you get logged out. Otherwise unset it to turn off the feature: unset ...


9

If you are using GNU/Linux, you don't have to use Putty. That part of the tutorial is geared towards Windows users. Just set your .pem file permissions to r-- by doing chmod 400 mykey.pem then you can pass it straight to ssh : ssh -i mykey.pem user@aws-host.amazon.com


8

Just press CtrlD and it will log you out there for hold ctrl and press "d" till the window disappears.


8

According to this page you can convert your dsa keys to a format that PuTTY will accept with a PuTTY tool, PuTTY Key Generator. There is more detail on this page which describes importing your RSA or DSA key into PuTTY format. Essentially, you just select 'Import Key' from the 'Conversions' menu and navigate to where the key is stored on your machine.


7

The path of least resistance is to tell your shell on the Solaris box what the escape sequences sent by PuTTY mean. You see a ~ because these keys emit an escape sequence like ​␛[3~ where ​␛ is the escape character (\e, ASCII 27). Type Ctrl+V followed by one of the keys so that the ​␛ character is inserted literally, followed by the other characters. Then ...


7

Your best bet is probably to look at PuTTY's Application Cursor Keys mode configuration. The default sequences send ESC as a prefix and [ followed by Append or Change or other things throwing you into insert mode. added, following Gilles A slightly more explicit version of the ^V escape can be seen with od(1). Here is me typing ^Up, ^Down, ^Right, ^Left ...


7

This has nothing to do with the noai option. What you are experiencing, is a little trouble copy-pasting a load of text with existing indents to vim. What I usually do (I have this 'problem' a lot), is bind F4 to invpaste and then, before I paste stuff into vim, hit that key. It makes the problem go away. nnoremap <F4> :set invpaste paste?<CR> ...


7

Try this, it worked for me on putty: Ctrl+Q - XON Ctrl+S - XOFF


6

Here are a few things you can try: 1) It's most likely the shell which is timing out. Disable the timeout by unsetting TMOUT in your profile. TMOUT is the number of seconds that bash waits for input before terminating. Echo $TMOUT to see if it is set. Add the following to your profile: unset TMOUT 2) Configure PuTTY to send keepalive packets by going ...


6

Simply close PuTTY. (Alt+F4 by default IIRC.)


6

To get X11 forwarding working I needed to execute yum install xauth. At that point Terminator didn't render the console font properly. I was not particularly concerned about having a minimal set of fonts so I did yum -y groupinstall fonts and restarted terminator. The fonts rendered properly.


6

putty.exe -ssh user@192.168.1.1 -pw password -m C:\local\file\containing_command Et voilà ! simple and easy. From putty help chapter 3.8.3.6: -m: read a remote command or script from a file The -m option performs a similar function to the ‘Remote command’ box in the SSH panel of the PuTTY configuration box (see section 4.18.1). However, the -m ...


6

Ok, I figured out the solution to my own problem. By default CygwinX no longer listens for tcp connections (Cyg SSH is using Unix sockets to connect). To enable tcp connections "-listen tcp" needs to be added to the command line parameters. In my case I changed the "XWin Server" icon to read: C:\cygwin64\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; /...


5

I needed to do the same thing, found the key documented as Dustin Kirkland had stated, but for me, ctrlb shift-F12. Of course, if you have remapped your bind-key to ctrla then adjust accordingly. The bind-key is not necessary for this to work. It is a toggle, so you only need to toggle it once with the shift-F12 and then if you need the Byobu function keys ...


5

You want your rule to pay attention to the tty subsystem, not the usb one. SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="serial" A USB device generates several udev events when you plug it in as the kernel recognizes more things about it. Since it's a USB device, it first engages the usb subsystem, which I think will ...


5

You want to get this into Excel? Why copy and paste? find . -name "index1.php" > out.txt Copy out.txt to your Excel machine (SCP is the easiest way), open it up.



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