Tagged Questions

SSH (Secure SHell) is a protocol for running commands on a remote computer.

learn more… | top users | synonyms

5
votes
1answer
3k views

Why don't Page U/Down, Home/End work in less on Solaris over ssh from Ubuntu?

I need to work on a Solaris server over ssh from my Ubuntu (Lucid) laptop. I got Home/End Insert/Delete Page Up/Down working in csh and bash using bindkey and ~/.inputrc, respectively. But I can't ...
8
votes
2answers
3k views

Creating a UNIX account which only executes one command

Is there a way to create a user account in Solaris which allows the users to run one command only? No login shell or anything else. I could possibly do it with /usr/bin/false in /etc/passwd and just ...
4
votes
3answers
2k views

Make terminal text color different when in ssh session

Is there a way to make my terminal (konsole) display different text colors when I'm in an ssh session WITHOUT modifying the remote host's color configuration? Like, maybe automatically switching to a ...
1
vote
1answer
1k views

vnc connection working with PuTTY but not with command line

I am using PuTTY to connect to a distant network to then set up x11vnc and then using ssl/sshvnc as a client. in the host name for PuTTY I have: ssh.inf.uk and port: 22 in the ssh tunnel options I ...
3
votes
1answer
743 views

SSH getting disrupted intermittently

I have Red Hat Linux Enterprise Edition 5 on my box. Recently I started having issues with my SSH service not keeping my connection and randomly disconnecting my clients. Ping works perfectly fine, ...
10
votes
2answers
13k views

ssh and character encoding

When I ssh into my VPS, I have irssi running in screen. When someone sends a unicode character (such as © or €), irssi displays garbage when I use it via the screen in a ssh session. If I connect to ...
1
vote
1answer
1k views

What strings should I look for in /var/log/auth.log?

I wrote a bash command to scan /var/log/auth.log for messages occurring on the current day indicating unauthorised access. Currently it just fetches messages matching BREAK-IN and unauthorized. What ...
1
vote
1answer
163 views

vnc over ssh port assignment

At the office I have on the servers a vnc server running. In Windows I use putty to connect to the server, I log in and then use realvnc to see the desktop. But I cannot get this to work on Linux. I ...
13
votes
3answers
3k views

What are the pros/cons of the various methods to block brute force SSH attacks?

There are a number of different packages out there to shut out IPs from which brute-force SSH attacks are launched on your system. For example: DenyHosts Sshguard fail2ban What are the pros/cons ...
40
votes
4answers
40k views

What do the options `ServerAliveInterval` and `ClientAliveInterval` in sshd_config do, precisely?

I found this question, but I'm sorry I don't quite understand the settings on the two variables ServerAliveInterval and ClientAliveInterval mentioned in the accepted response. If my local server is ...
15
votes
3answers
1k views

Why change default ssh port?

I've noticed lot of admins change default ssh port. Is there any rational reason to do so?
38
votes
1answer
6k views

Kill an unresponsive ssh session without closing the terminal

Is there a way to disconnect from an SSH session that has become unresponsive without killing the whole terminal? Specifically I'm using konsole, and the machine I'm working with sometimes hangs, but ...
2
votes
4answers
368 views

SSH Do not connect even with publickeys installed

I'm trying to connect two servers. I got the id_dsa.pub key from user john from server A and paste into authorized_keys of user mike from server B. Then I tried to connect from server A to server B ...
78
votes
9answers
55k views

SSH easily copy file to local system

If I'm logged in to a system via SSH, is there a way to copy a file back to my local system without firing up another terminal or screen session and doing scp or something similar or without doing SSH ...
9
votes
2answers
8k views

Starting firefox on a remote host (over ssh) opens a new window locally: what is happening?

I have never noticed this behaviour before, and am a little confused as to what is happening. I have a local copy of firefox running, then ssh (ssh -X <url>) into a remote server and start a ...
8
votes
1answer
974 views

Bash autocomplete in ssh session

It seems that bash doesn't want to autocomplete commands (what's annoying me right now is not autocompleting apt-get) when I'm logged into my machine from SSH. Is there some setting that will allow ...
0
votes
3answers
835 views

Being kicked out upon logging in using ssh

Does anyone know why I am kicked out immediately after everytime I log in? Here is the output: $ ssh tim@xxxx.xxx.xxx.xxx Password: Linux xxxx 2.6.32-24-server #43-Ubuntu SMP Thu Sep ...
11
votes
5answers
2k views

How to copy a file that is still being written over ssh?

Here is the situation: I am uploading a large file from client A to a server using sftp. I also need to download this file from the server to client B over ssh. What I would like to do is start ...
4
votes
3answers
684 views

tunneling VNC/rdesktop over ssh

I'm having a friend behind a firewall, with a windows computer. I'm having a Linux machine at home which is not behind a firewall. I want to have an rdesktop connection to his machine, without using ...
16
votes
4answers
6k views

Can I pipe /dev/video over ssh

I have two computers, a desktop in my office ( with a webcam attached ) and a laptop somewhere else on the network. Usually I take a look at my office through my webcam by running ssh Office -Y ...
11
votes
4answers
5k views

Given keys in ~/.ssh/authorized_keys format, can you determine key strength easily?

~/.ssh/authorized_keys[2] contains the list of public keys. Unfortunately, each public key does not specify the key strength ( number of bits ). Is there a utility that can process this file line by ...
7
votes
4answers
4k views

How do I connect to a pc through another pc using ssh

I have three Computers. PC1 and PC2 is on a private LAN, where PC1 is known to PC2 as 192.168.0.2 PC2 and PC3 is on a another LAN, where PC2 is known to PC3 as 192.168.123.101 How can I connect to ...
6
votes
2answers
745 views

Is it possible to break long lines in sshd_config?

Specifically AllowUsers parameter: e.g. convert this AllowUsers user1 user2 user3 user4 to this AllowUsers user1 user2 user3 user4
31
votes
5answers
26k views

What does the Broken pipe message mean in an SSH session?

Sometimes my SSH session disconnects with a Write failed: Broken pipe message. What does it mean? And how can I keep my session open? I know about screen, but that's not the answer I'm looking for. I ...
2
votes
2answers
548 views

Script for ssh Agent Management: Is this adequate? Any bugs?

The following is something I use to manage my ssh agent settings. #!/bin/echo "Must source this:" ## Ensure that ~/.ssh/env contains valid values unset SSH_AGENT_PID SSH_ENV_REFRESH [ -r ...
9
votes
3answers
7k views

Differences between VNC and ssh -X

Why would you use VNC (or for that matter NX) instead of just using ssh -X (-Y). I read that VNC uses less bandwidth, but is there any other differences/advantages with respective tool?
5
votes
1answer
612 views

Why is vimdiff so slow?

Whenever I'm in vimdiff mode, my PuTTY session slows down considerably. This is especially noticeable when I try to scroll down many lines by keeping j pressed. Why is it so slow in comparison to ...
12
votes
4answers
2k views

OS X: how to keep the computer from sleeping during a ssh session

When I ssh into a OS X computer on my network the session lasts until the OS X goes into sleep mode. Is there a way to prevent this from happening during my SSH session, apart from physically bumping ...
7
votes
3answers
5k views

Redirect stdout over ssh

I would like to run something > file on a remote system through ssh, but if I run ssh host something > file the redirection is executed locally as ssh etc > file I've tried it with ' ...
5
votes
1answer
5k views

Remote for-loop over SSH

I have the following in a script for server in ${servers[@]}; do echo ${server} ssh user@${server} "for i in /tmp/foo* ; do echo ${i}; done" done But it doesn't work. Weird thing, I see $I amount ...
4
votes
1answer
983 views

Tunnel traffic through another machine over ssh

I want to be able to route a portion of my traffic through another machine over SSH. For example, is it possible to browse the web through the ssh tunnel and also browse the web through your LAN ...
7
votes
4answers
1k views

How to set up two-factor authentication with OTP on FreeBSD?

I have a FreeBSD hosted server that I like to be able to get to from anywhere. Normally I use SSH publickey to log in, or if I don't have my SSH private key available then I might use regular password ...
8
votes
3answers
10k views

passwordless ssh for another username?

I want to do a passwordless ssh connection for a subversion project. Right now I'm using ssh+svn, and it's a little annoying, because I have to type the password any time I want to transact with the ...
8
votes
3answers
14k views

Can I connect to or view abandoned ssh sessions?

I have a virtual instance of redhat running that I can ssh to from any host on the corporate network. My ssh session was dropped while running some scripts that may or not have caused me to ...
3
votes
1answer
310 views

Xterm is not completely erasing field lines

We are running Windows Clients with Cygwin XServer that has a bash script application running on AIX Unix. We have a login script using expect to ssh into the server and then xterm to create the ...
15
votes
5answers
7k views

How can I tell what version of OS X I'm on from the command line?

I frequently find myself SSHing into various OS X machines, and it'd be useful if I could tell what version of OS X I was on when I'm doing that. uname -a doesn't quite work, since Darwin kernel ...
3
votes
8answers
730 views

Write a remote managing script

I need to be able to locally run a script that will connect to various servers and run commands on them. What is the best way to accomplish this?
4
votes
5answers
1k views

How does ssh -X function?

When using ssh -X is the executable copied and run locally or is it run on the host machine. Since it is called X11 forwarding it makes me think that the window is drawn on my machine but running on ...
15
votes
2answers
6k views

How can I determine if someone's SSH key contains an empty passphrase?

Some of my Linux & FreeBSD systems have dozens of users. Staff will use these "ssh gateway" nodes to SSH into other internal servers. We're concerned that some of these people use an unencrypted ...
81
votes
6answers
38k views

Keep SSH Sessions running after disconnection

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and ...
7
votes
4answers
5k views

How can I set up smart card SSH authentication?

I would like to be able to SSH to my machine using a Gemalto .NET Smart Card as the authentication method. How could this be done on a Fedora 13 (or generic Red Hat style) machine? These are the ...
5
votes
5answers
506 views

Sftp interface to Scp

I have a linux based router that doesn't have the SFTP server installed. More specifically, when I sftp user@ipaddress I get a sh: /user/libexec/sftp-server: not found error. My interest isn't trying ...
26
votes
5answers
25k views

scp without replacing existing files in the destination

How do I copy an entire directory into a directory of the same name without replacing the content in the destination directory? (instead, I would like to add to the contents of the destination folder) ...
11
votes
3answers
9k views

SCP from one server to another without password prompt

What is the best way of doing SCP from one box to the other without prompting for password? There are two servers: Server A (10.152.2.10): /home/oracle/export/files.txt Server B (10.152.2.11): ...
13
votes
6answers
5k views

How do I copy all files and directories except certain ones over ssh?

Using the Linux command line, I use the scp command to copy up all the files and folders from a certain directory. However, I don't like to consume wasted bandwidth for copying up things I rarely ...