Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject:
PostPosted: Mon Apr 23, 2012 3:42 am 
Offline
Junior Member

Joined: Mon Sep 19, 2011 2:48 am
Posts: 28
Avinash.Rao wrote:
Thanks a lot..

I did everything that was listed the tutorial website.
The rpm build completed without any errors. Unfortunately, the version doesn't seem to change!

So the ssh -v shows same version? Did you remember to install the rpm's?
Quote:
Now if you go back into /usr/src/redhat/RPMS/<arch> , you should see three RPMs. Go ahead and install them:
Code:
rpm -Uvh *.rpm


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 3:53 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
Yup!! Resolved!! Thank You so much for the support.
ssh restart successfully.

Can i configure this in such a way that the user should be able to ssh from a remote computer but also apply restriction in WinSCP?




Typo wrote:
Avinash.Rao wrote:
Thanks a lot..

I did everything that was listed the tutorial website.
The rpm build completed without any errors. Unfortunately, the version doesn't seem to change!

So the ssh -v shows same version? Did you remember to install the rpm's?
Quote:
Now if you go back into /usr/src/redhat/RPMS/<arch> , you should see three RPMs. Go ahead and install them:
Code:
rpm -Uvh *.rpm


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 3:57 am 
Offline
Junior Member

Joined: Mon Sep 19, 2011 2:48 am
Posts: 28
Avinash.Rao wrote:
Yup!! Resolved!! Thank You so much for the support.
ssh restart successfully.

Can i configure this in such a way that the user should be able to ssh from a remote computer but also apply restriction in WinSCP?

Glad you have it working :)

To be honest, I don't really understand your new question.


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 4:30 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
Adding users to 'filetransfer' group will prevent these users from being able to log into a remote shell session.

So its either only SFTP or SSH access, I want to be able to enable the same for a single user!

Typo wrote:
Avinash.Rao wrote:
Yup!! Resolved!! Thank You so much for the support.
ssh restart successfully.

Can i configure this in such a way that the user should be able to ssh from a remote computer but also apply restriction in WinSCP?

Glad you have it working :)

To be honest, I don't really understand your new question.


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 4:47 am 
Offline
Junior Member

Joined: Mon Sep 19, 2011 2:48 am
Posts: 28
Avinash.Rao wrote:
Adding users to 'filetransfer' group will prevent these users from being able to log into a remote shell session.

So its either only SFTP or SSH access, I want to be able to enable the same for a single user!

Not sure off the top of my head but I can probably do some looking for you in a little bit but first thing you should re post your current sshd_config so we can make sure where you are config wise so whether its me or someone else who helps, we have all the proper info.


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 4:51 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
sshd_config

# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
#UsePAM no
UsePAM yes

# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp internal-sftp
Match group filetransfer
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 4:52 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
I have posted the sshd_config file.

The reason I am asking is I have a user who needs to use both ssh and SFTP.



Typo wrote:
Avinash.Rao wrote:
Adding users to 'filetransfer' group will prevent these users from being able to log into a remote shell session.

So its either only SFTP or SSH access, I want to be able to enable the same for a single user!

Not sure off the top of my head but I can probably do some looking for you in a little bit but first thing you should re post your current sshd_config so we can make sure where you are config wise so whether its me or someone else who helps, we have all the proper info.


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 6:27 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Well, if they have shell access, they're going to be able to get at stuff outside of their home directory, so it's kinda pointless to restrict scp/sftp.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 6:33 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
Yes, you are right. But, when he uses ssh, he will still login only to his home directory.

There is one user account used to configure SQL Databases and preform regular backups. These files need to be copied to an external machine using WinSCP. Both are required to be performed.

hoopycat wrote:
Well, if they have shell access, they're going to be able to get at stuff outside of their home directory, so it's kinda pointless to restrict scp/sftp.


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 7:17 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Chrooting a shell is a whole different story to chrooting sftp, they need to actually have access to a shell and all the required libraries and binaries inside the chroot. Not sure how to do it on centos on debian/ubuntu I've done it using debootstrap but then again I've no idea how secure that is (I didn't do it for security reasons)

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 9:10 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
1) We are forcing users to use sftp through a normal user group settings. Making a user part of 'filetransfer' group and then using internal sftp. Is it possible that this group can be given permissions to SSHD?

2) I have upgraded sshd manually? Why isn't this possible through normal OS updates?


Top
   
 Post subject:
PostPosted: Mon Apr 23, 2012 6:43 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Avinash.Rao wrote:
1) We are forcing users to use sftp through a normal user group settings. Making a user part of 'filetransfer' group and then using internal sftp. Is it possible that this group can be given permissions to SSHD?


You can either force them to use sftp, or not force them to use sftp.

Quote:
2) I have upgraded sshd manually? Why isn't this possible through normal OS updates?


It is, but once you choose a particular OS release, you normally get security updates and major bug fixes only. You've chosen CentOS, which is strongly based on RHEL, a distribution known for choosing long-term stability over all else. CentOS 5 gets you OpenSSH 4.3p2-82.el5, CentOS 6 gets you 5.3p1-70.el6, and that's what you're going to get.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group