RAM Host Community Forums

Knowledge and Help for our Customers (and everyone else)

You are not logged in.

#1 15 Nov 2009 5:13:38 pm

ramnet
Moderator
From: USA
Registered: 15 Nov 2009
Posts: 582
Website

SSH/SFTP - Install OpenSSH Server

By default, all our supported operating systems only include a cron daemon and a syslog daemon.

Many of our users are accustomed to directly logging into ssh as user root - this document shows you how to do that.

This procedure will also make SFTP and SCP work too!

----

1) Login to the out of band (OOB) console (instructions here)

2) Once you're in, run one of the following commands depending on what OS you are using:

# apt-get install openssh-server

# yum install openssh-server

# pacman -Syu openssh

3) If you haven't done so already, run:

# passwd

Now you can connect directly to your VPS IP address over SSH and SFTP as user "root" with the password you specified.

If you're on Windoze a good SFTP client that we suggest is WinSCP - and of course PuTTY for console SSH.

Last edited by ramnet (16 Nov 2009 6:04:36 pm)


Alex, RAM Host

Offline

#2 26 Nov 2009 2:28:26 pm

gepman
Member
From: Belgium, Ghent
Registered: 19 Nov 2009
Posts: 29

Re: SSH/SFTP - Install OpenSSH Server

Is it possible to restrict ssh logins to some users but still allow them to use SFTP ?
Or you have to apply some kind patch to it, or use some other ssh server?


<>_<>
.icu.

Offline

#3 26 Nov 2009 2:33:15 pm

ramnet
Moderator
From: USA
Registered: 15 Nov 2009
Posts: 582
Website

Re: SSH/SFTP - Install OpenSSH Server

gepman wrote:

Is it possible to restrict ssh logins to some users but still allow them to use SFTP ?
Or you have to apply some kind patch to it, or use some other ssh server?

You can do that by changing the user's default login shell like so:

# chsh -s /usr/lib/openssh/sftp-server username

this will set the users' shell to be the sftp server - making that the only thing they can access.

Note: Your path to sftp-server may be different - look inside /etc/ssh/sshd_config at the "Subsystem sftp" line to figure out where the "sftp-server" binary is located.


Alex, RAM Host

Offline

#4 26 Nov 2009 2:37:17 pm

gepman
Member
From: Belgium, Ghent
Registered: 19 Nov 2009
Posts: 29

Re: SSH/SFTP - Install OpenSSH Server

Thanks a million!!!


<>_<>
.icu.

Offline

#5 28 Nov 2010 10:02:52 am

Prism
Member
Registered: 27 Nov 2010
Posts: 12

Re: SSH/SFTP - Install OpenSSH Server

Is there any reason to use SSH instead of the given console, though? Sure, login procedure is longer but that way the VPS uses less ram (not that sshd uses much though) and there's one less attack vector and one less login to secure and maintain. Are there any limitations/drawbacks of the VPS console over sshd? (Apart from sftp)

Last edited by Prism (28 Nov 2010 10:08:34 am)

Offline

#6 28 Nov 2010 1:09:24 pm

ramnet
Moderator
From: USA
Registered: 15 Nov 2009
Posts: 582
Website

Re: SSH/SFTP - Install OpenSSH Server

Prism wrote:

Is there any reason to use SSH instead of the given console, though? Sure, login procedure is longer but that way the VPS uses less ram (not that sshd uses much though) and there's one less attack vector and one less login to secure and maintain. Are there any limitations/drawbacks of the VPS console over sshd? (Apart from sftp)

If you use the provided host recovery console the following limitations apply:

1) no sftp or scp

2) no multi-users (you always login as the root user)

3) no  ssh proxying/tunneling

4) no X11 forwarding

5) no passwordless (key-based) logins

There may be others but those are the big ones.

You can certainly get by without installing your own sshd if you'd like smile


Alex, RAM Host

Offline

#7 02 Jun 2011 3:45:02 am

eric6630
Member
Registered: 02 Jun 2011
Posts: 3

Re: SSH/SFTP - Install OpenSSH Server

[root@vps /]# yum install openssh-server
Setting up Install Process
Package openssh-server-4.3p2-72.el5_6.3.i386 already installed and latest version
Nothing to do

[root@vps/]# pacman -Syu openssh
-bash: pacman: command not found



please help

Offline

#8 02 Jun 2011 6:04:14 am

eric6630
Member
Registered: 02 Jun 2011
Posts: 3

Re: SSH/SFTP - Install OpenSSH Server

why the connection still refused by network?

Offline

#9 02 Jun 2011 7:03:26 am

raidentony
Member
Registered: 10 Jan 2010
Posts: 26

Re: SSH/SFTP - Install OpenSSH Server

pacman is for ArchLinux, and I suppose you're using CentOS, so pacman is not needed.
try /etc/init.d/sshd start and logon again.
if still doesn't work, run netstat -aln and paste the result here.

Offline

#10 02 Jun 2011 10:01:57 pm

eric6630
Member
Registered: 02 Jun 2011
Posts: 3

Re: SSH/SFTP - Install OpenSSH Server

thank you it works

Offline

#11 21 Jan 2012 6:02:36 am

Neal
Member
Registered: 20 Jan 2012
Posts: 4

Re: SSH/SFTP - Install OpenSSH Server

how can config the SSH server for redirecting?

Offline

#12 29 May 2012 1:44:24 am

johnkrueger
Member
Registered: 29 May 2012
Posts: 1

Re: SSH/SFTP - Install OpenSSH Server

Running Ubuntu 10.04, I'm logged into my VPS and when I try apt-get install openssh-server I get a bunch of error 404  Not Found [IP: 2610:148:1f00:6f00:216:36ff:fee9:2178 80] and unable to fetch some archives.
Any ideas as to what is going wrong?

Offline

#13 29 May 2012 1:45:38 am

admin
Administrator
Registered: 15 Nov 2009
Posts: 364
Website

Re: SSH/SFTP - Install OpenSSH Server

johnkrueger wrote:

Running Ubuntu 10.04, I'm logged into my VPS and when I try apt-get install openssh-server I get a bunch of error 404  Not Found [IP: 2610:148:1f00:6f00:216:36ff:fee9:2178 80] and unable to fetch some archives.
Any ideas as to what is going wrong?

You should run apt-get update to get a fresh copy of the package database.


Robert, Owner, RAM Host

Offline

#14 06 Feb 2013 3:59:57 am

pylyp
Member
Registered: 06 Feb 2013
Posts: 1

Re: SSH/SFTP - Install OpenSSH Server

Debian 6
#apt-get install openssh-server - done
#apt-get update - done
#apt-get upgrade - done
#passwd - done

Start new session with VPS IP, port 22 (PuTTY on win) - Networ error: Connection refused

What I'm doing wrong?

Thanks

---------------
sorry, problem solved
# dpkg --get-selections - no openssh packets
I'm reinstall openssh-server:
#apt-get install openssh-server - all works fine

Last edited by pylyp (06 Feb 2013 4:42:49 am)

Offline

Board footer

Powered by FluxBB