Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I think you need to create a user account on that machine.
If you don't know what SSH is and how it works then please explain why you want to install it.
People here will try to help but as far as I am aware none are mind readers so can only do on the information you give.
I need to make a local connection to the server.
To run commands on the server using ssh remote connection .
Sorry I didn't explain from the beginning ... Of Course none are mind readers
I just didn't realize that such data was important
Thanks for every one tried to help without having enough info.
If you can login in on the console of that server you might check to see what access modes are on /dev/null.
/dev/null is used for a lot of things - redirecting stdin to read from null is used to ensure that a program gets an EOF if it reads anything. Redirecting stdout/stderr to it discards the output.
sshd will use it sometimes (it depends on what you are doing, such as attempting to forward X Window applications - it uses xauth set the access key, but redirects stdin from /dev/null)
If you can login in on the console of that server you might check to see what access modes are on /dev/null.
/dev/null is used for a lot of things - redirecting stdin to read from null is used to ensure that a program gets an EOF if it reads anything. Redirecting stdout/stderr to it discards the output.
sshd will use it sometimes (it depends on what you are doing, such as attempting to forward X Window applications - it uses xauth set the access key, but redirects stdin from /dev/null)
#ls -l /dev/null
gives the result :
crw-rw-r--. 1 root utmp, 3 Jun 9 13:52 /dev/null
Do I need to change permission ?
Which is wrong ?
What command line shall give a user access to /dev/null
that gets " shh" to work ?
Thanks for your help
#chmod -R 666 /dev/null
changed the permission to
crw-rw-rw-. root utmp 1
Then , trying to use " ssh " with a new created user gives the following :
The authenticity of host 'master (192.168.0.200)' can't be established.
RSA key fingerprint is f0:80:f7:67:23:d4:12:90:f7:c1:a5:bb:a5:bb:c9:16:19:22
Are you sure you want to continue connecting (yes/no)? Terminated
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,679
Rep:
Quote:
Originally Posted by esraam
I need to make a local connection to the server.
To run commands on the server using ssh remote connection .
Sorry I didn't explain from the beginning ... Of Course none are mind readers
I just didn't realize that such data was important
Thanks for every one tried to help without having enough info.
which local server? From what other machine?
Who set up the server? Which credentials did they give you?
What are you actually trying to do here?! Are you setting up a home test environment or trying to log into a server at work? What is the setup?
As to /dev/null I am guessing (and only guessing I admit) that the reason it was displayed is the username being used has a shell set to it for whatever reason.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,679
Rep:
Sorry I moissed thios from my last post but what happens when you are using your local machine as a user other than root and try to SSH to the server? This is assuming somebody else has set this up for you.
which local server? From what other machine?
Who set up the server? Which credentials did they give you?
What are you actually trying to do here?! Are you setting up a home test environment or trying to log into a server at work? What is the setup?
As to /dev/null I am guessing (and only guessing I admit) that the reason it was displayed is the username being used has a shell set to it for whatever reason.
So, please, what is the setup here?
I am working on a server connected to clients .
I have the permissions to work as root or to set a user and work .
I made a new user myself ( cz it seemed that root doesn't work with ssh )
I am trying to log onto a server at work .
I am using the server to log onto the server then I will log onto the clients to do work .
As for /dev/null : The user has a shell ?
Sorry I couldnt understand.
How can I check ?
Or how can I change settings for the user ( I can work as root and change user's permissions if necessary , but how ? )
There is ni such line in the /etc/ssh/sshd_config file
Here is the file contents :
[
# $OpenBSD: ssh_config,v 1.25 2009/02/17 01:28:32 djm Exp $
#This is the ssh client system wide configuration file . See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
#configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file.
# 3. system-wide file.
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and the defaults at the end.
# Site- wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
Sorry I moissed thios from my last post but what happens when you are using your local machine as a user other than root and try to SSH to the server? This is assuming somebody else has set this up for you.
With another user , I got the following :
[
The authenticity of host 'master (192.168.0.200)' can't be established.
RSA key fingerprint is f0:80:f7:67:23:d4:12:90:f7:c1:a5:bb:a5:bb:c9:16:19:22
Are you sure you want to continue connecting (yes/no)? Terminated
]
I can log in as root and change settings if necessary.
Please tell me what settings need to be changed ?
And How to change them .
Something is odd with the installation. The default /etc/ssh/sshd_config file should contain:
Code:
# $OpenBSD: ssh_config,v 1.28 2013/09/16 11:35:43 sthen Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
# Host *
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W h:%p gateway.example.com
# RekeyLimit 1G 1h
#
# Uncomment this if you want to use .local domain
# Host *.local
# CheckHostIP no
Host *
GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
# ForwardX11Trusted yes
# Send locale-related environment variables
SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE
SendEnv XMODIFIERS
I also note that your header indicates a 2009 release - a rather OLD one.
You might include the listing from "ssh -vvv ..." (in "[ code ]"... "[ /code ]" blocks and without the spaces in [ code ] ..., some of the line breaks can be significant as to how to interpret the error and some of the output lines are QUITE long).
Your termination appears to occur at the host key check. This might be caused by several things - the simple one being an improper access permissions on your (client) .ssh directory tree (it should be drwx------ and any private keys rwx------). It is hard to tell on which side (client/server) the termination is occuring. It sort of looks like it is the server side, but can't tell for sure.
Something is odd with the installation. The default /etc/ssh/sshd_config file should contain:
Code:
# $OpenBSD: ssh_config,v 1.28 2013/09/16 11:35:43 sthen Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
# Host *
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W h:%p gateway.example.com
# RekeyLimit 1G 1h
#
# Uncomment this if you want to use .local domain
# Host *.local
# CheckHostIP no
Host *
GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
# ForwardX11Trusted yes
# Send locale-related environment variables
SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE
SendEnv XMODIFIERS
I also note that your header indicates a 2009 release - a rather OLD one.
You might include the listing from "ssh -vvv ..." (in "[ code ]"... "[ /code ]" blocks and without the spaces in [ code ] ..., some of the line breaks can be significant as to how to interpret the error and some of the output lines are QUITE long).
Your termination appears to occur at the host key check. This might be caused by several things - the simple one being an improper access permissions on your (client) .ssh directory tree (it should be drwx------ and any private keys rwx------). It is hard to tell on which side (client/server) the termination is occuring. It sort of looks like it is the server side, but can't tell for sure.
"ssh -vvv ..." (in "[ code ]"... "[ /code ]"
what shall be in [code] ?
It should be drwx ..... and not crwx ?
I think it is the server side as I am only using the server to make local connection on the server .
But how to solve this ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.