SSH (Secure SHell) is a protocol for running commands on a remote computer.
5
votes
3answers
2k views
Copying protected files between servers in one line?
I'd like to copy squid.conf from one server to another.
The servers don't talk to each other. I'd like to go through my workstation.
Both servers have the file, so it will be overwritten on the ...
5
votes
1answer
5k views
Use ssh with a specific network interface
I'm using openconnect to connect to vpn. After entering my credentials, I get this:
POST https://domain.name/...
Got CONNECT response: HTTP/1.1 200 OK
CSTP connected. DPD 30, Keepalive 30
Connected ...
5
votes
1answer
2k 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 ...
5
votes
1answer
2k views
SSH over Socks proxy without username or password
I have a list of SOCKS proxy servers from this site.
I've read about creating a dynamic tunnels with ssh -D and to be honest i've tried that already. Unfortunately for some reason I cannot connect to ...
5
votes
1answer
64 views
Does fail2ban offer any additional protection to SSH if password login is already turned off?
I’m setting up a Debian VPS on Linode to use as a public web server, and I’m following their security suggestions.
The last suggestion they make is to install fail2ban, to avoid dictionary attacks on ...
5
votes
2answers
133 views
As what user is an sshfs mounted folder being accessed?
I'm trying to do a network backup of a drive. There are two machines in this process.
PC1:
Distant machine with 2 hards sda and sdb
sdb is the drive which needs backing up
two users exist, root and ...
5
votes
2answers
935 views
Passing SSH options to git-clone
I connect to my server using SSH:
ssh user@server -p 2224 -zZ abcd
I also have a git repository on my server. The only way I know to clone is:
git clone ssh://user@server.com:2224/path/to/repo
...
5
votes
1answer
548 views
How to detect when a shell is owned by a remote SSH session?
My question is similar to this one, but I'm looking for something slightly different. I have a notebook PC that I use to access Linux machines on a network in two different scenarios:
I have a ...
5
votes
2answers
526 views
Giving some users only SSH and shell access with limited resource usage
I'm trying to make a user that can access my server through SSH and allow it to have a shell, limited to using only, say screen and irssi. And it shouldn't it be able to see other directories except ...
5
votes
2answers
3k views
Not able to ssh in to remote machine using shell script in Crontab
Below is the script which i am trying to run, which runs without any issue
for i in `seq 200 2100`
do
usr=(`ssh -t -t -o ConnectTimeout=60 machine$1 finger | tail -1 | awk '{print$1}'`)
echo ...
5
votes
2answers
220 views
How to disable login for an user?
My Linux has many not-human users like cron, ntp, daemon, http, etc. I want to disable anybody to login as any of this users. Real people on my machine are root and me, so only root and me should be ...
5
votes
1answer
213 views
Automated ssh login with passphrase?
Logging onto a machine over ssh typically requires a password to be entered before access is granted. Alternatively, a key/certificate (without a passphrase) can be installed onto the remote machine ...
5
votes
1answer
163 views
Public Key Auth + Kerberos
I've setup public key authentication for ssh'ing into my university machine. However, it only logs me in on the local machine and doesn't give me Kerberos credentials which I need for accessing my ...
5
votes
1answer
279 views
Why is it possible to leave CHROOT with this config?
I'm trying to create the user lenny, that has read and write permissions in the folder /home/lenny/ and has no shell but only access via SFTP. I'm doing the following:
useradd lenny
mkdir /home/lenny
...
5
votes
1answer
572 views
playing a sound/notification in finch over ssh on my local machine
So I have finch, a command line chat client (think pidgin) running on a remote machine that I ssh into. finch has notification sounds and can run a command when certain events occur, letting you pass ...
5
votes
2answers
5k views
How to edit authorized_keys?
What is the best method for editing the /root/.ssh/authorized_keys file?
I mean if I need to append a new key to my authorized_keys file, than what are the best methods to do that?
5
votes
4answers
928 views
How to debug SSH port forwarding
This is an extension to ssh port forward to access my home machine from anywhere
I tried things mentioned there but I am not able to ssh to my machine.
Netgear router settings for port forwarding:
...
5
votes
2answers
299 views
Configuring a vncserver so it's only accessible from my ssh tunnel
Since I use vnc through an ssh tunnel, is there any way I can block the open vnc port that the remote machine is listening on without it affecting my ability to use the ssh tunnel? Both machines are ...
5
votes
2answers
373 views
How can I forward traffic from my publicly available server to a computer that is not publicly available?
My home computer is behind an ISP-level NAT which does not allow me to host game servers as a result.
I have a VPS which I use as a web server. I want to host a game server of Minecraft, but the VPS ...
5
votes
1answer
1k views
TAB autocomplete in Bourne Shell
I don't know how to get the TAB key to autocomplete filenames, commands, or anything at all.
I'm on a Unix-like system (OS/390) and depend on several scripts that work in sh (Bourne shell, not ...
5
votes
3answers
4k views
ssh prompts for password despite ssh-copy-id
I've been using public key authentication on a remote server for some time now for remote shell use as well as for sshfs mounts. After forcing a umount of my sshfs directory, I noticed that ssh began ...
5
votes
1answer
60 views
Forward all ports SSH
I have a question about SSH/Port forwarding. I haven't found the solution anywhere and don't know if there is any.
I have a server behind my NAT box at home. I have port forwarding from my NAT box to ...
5
votes
2answers
338 views
Prevent SSH client passing TERM environment variable to server?
I'm currently using Fedora 18 gnome-terminal, then started tmux multiplexer in it. After I connected to a CentOS 5 server via ssh command, I find:
ls result has no color
tmux, screen, hexedit, htop ...
5
votes
1answer
227 views
Is there any way to get an HTML page rendered through Chrome/Chromium from a console?
Is there any way to get (into a file, for example) a rendered HTML page from Google Chrome/Chromium, but from a console. For example, SSHed into a machine that has Chrome/Chromium installed on ...
5
votes
3answers
258 views
firefox process dies after ssh log out on remote machine
I need to run firefox on a remote host via ssh and keep process running even after ssh logout.
I already have tried these ways:
nohup firefox &
screen
disown -h
But it seems these work only ...
5
votes
1answer
255 views
How to use ssh-agent with multiple (valid) keys and yet choose which one to use?
Let's say there are two keys A and B, both of which are valid for user@host public key authentication. Since authorized_keys is configured for different behaviour depending on the key, ~/.ssh/config ...
5
votes
3answers
1k views
A Web ssh/telnet client
I'm in kind of a tight spot right now. I wanted to know if someone has seen a HTML, or PHP web ssh client as both my company and school block everything besides port 80. I'm a control freak when it ...
5
votes
2answers
757 views
How to find the cause of an ssh-scan exploit?
One customer emailed my about their provider about to shut down a server because ssh attacks.
I logged in to the server and found a lot of ssh-scan processes, and some strange files in /tmp.
I had ...
5
votes
2answers
686 views
working with filenames in a different encoding over ssh
I'm ssh'ing to a remote system where a different encoding for the filenames (and for the users' locales) has been used. And this causes some problems.
Problems solved by matching the locale settings
...
5
votes
1answer
3k views
Switch VI to use backspace key instead of Control+H for backspace?
I'm on Solaris 10 and by default vi version SVR4.0, Solaris 2.5.0 is installed.
The system was set up so that when I ssh to it Control+H does backspace, and backspace outputs ^?
I added stty erase ...
5
votes
4answers
1k views
automatic passwordless ssh at login/restart
I want to have passwordless ssh to persist even after after I restart or logoff and then login. Somehow I have to run ssh-agent and use command ssh-add at login. I read here to add following lines to ...
5
votes
1answer
424 views
SSH not terminated after exit when there is X Forward program
After running X programs over SSH, SSH doesn't terminate after shell exit (have to use e.g. CtrlC to kill it).
My guess is although the X program already exit, there is still some "connection" left ...
5
votes
1answer
176 views
SSH session pauses mid datastream; resumes with a keypress
I've had this problem occur at random, intermittently, across boxes at multiple companies, multiple distros, and multiple kernel revs. I think that I'm just cursed.
What happens is that I'll have a ...
5
votes
1answer
293 views
caching a master passphrase on a linux server
I am trying to use keychain on debian latest stable with some difficulty. Searching online I could not find a solution, but thought perhaps a different approach or a different tool might be better in ...
5
votes
2answers
975 views
Can KWallet manage my ssh passwords?
I need a way to store some SSH passwords. Note that these are login passwords which I need to pass to ssh; key authentication is unfortunately not an option. I'd like to be able to have KWallet fill ...
5
votes
0answers
197 views
Copy file over existing SSH session? [duplicate]
Possible Duplicate:
SSH easily copy file to local system
Let's give the following example:
I've connected to ssh user@myserver.com.
I need to copy a local file over to the remote ...
5
votes
3answers
2k views
ssh input from text file
These two question is driving me crazy and I don't have good expertise of ssh. (but I suspect it is to do with redirection only)
The questions are,
You want to pass multiple lines of input from a ...
4
votes
3answers
3k views
ssh remote server on some port other than 22 without password
I am usually connecting to the remote server with
ssh user@server.com -p 11000
and then giving the password each time for user.
How should I avoid entering the password each time I connect ...
4
votes
4answers
181 views
SSH “sleeping” for a long time before connect? [duplicate]
Possible Duplicate:
How to speed my too-slow ssh login?
I have a very strange issue with my SSH server. Whenever I attempt to connect, it literally waits about 30 seconds to a minute before ...
4
votes
5answers
798 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 ...
4
votes
3answers
468 views
Is it possible to download extremely large files intelligently or in parts via SSH from Linux to Windows?
I have a ~35 GB file on a remote Linux Ubuntu server. Locally, I am running Windows XP, so I am connecting to the remote Linux server using SSH (specifically, I am using a Windows program called SSH ...
4
votes
4answers
2k views
How to avoid being asked passphrase each time I push to Bitbucket
I set up my ssh stuff with the help of this guide, and it used to work well (I could run hg push without being asked for a passphrase). What could have happened between then and now, considering that ...
4
votes
2answers
2k views
What causes a ssh interruption?
What exactly causes a ssh connection to interrupt? When you idle for a while, it disconnects.
How do I keep the connection alive (without autossh or reconnect)?
4
votes
5answers
482 views
Multiple ssh sessions in single command
I'm trying to copy a database from one server to another. I tried using the following command and it's getting tied up on entering the ssh passwords. If I put in one server's password, it complains ...
4
votes
4answers
1k views
How to effectively use screen and SSH?
I'd like to configure SSH and screen such that a login will always reattach to a screen session. Ideally, that session would not quit but detach when I press C-d. How can this be achieved? And what ...
4
votes
2answers
870 views
How can I send single file to multiple remote sites at the same time?
Can scp be used to send a single file to multiple remote servers at the same time? If so, how? If not, what's the alternative?
4
votes
6answers
296 views
How to setup password-less ssh with RSA keys
I am trying to setup a password-less SSH configuration between two machines and am having trouble. There are a ton of howtos out there that I have followed and have had no success. Here are ...
4
votes
4answers
3k views
Set some firewall ports to only accept local network connections?
Basic firewall question:
How do I set up the firewall on a system in a LAN so that some ports are only open to connections from the local area network, and not from the outside world?
For instance, ...
4
votes
2answers
3k views
How do I disable remote root login via ssh?
How do i disable remote root login via ssh?
I want to log into my server (i use keys on my main comp) then su into root instead of access root directly.
I am using debian. I follow guides online ...
4
votes
5answers
387 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 ...