Results 1 to 10 of 16
Can i connect by a pc to an other with ssh and after to use ssh by second pc to connect to third pc?
if yes, the pcs must be ...
- 07-20-2011 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 24
ssh
Can i connect by a pc to an other with ssh and after to use ssh by second pc to connect to third pc?
if yes, the pcs must be as simple pcs or i must configure them for ssh operation?
- 07-20-2011 #2
yes.
The second and third machine need to run a ssh daemon.
Of course you need network connectivity (routing/firewall/vpn) to
and means of authentication (authorized keys/account/etc) for these two ssh daemons.You must always face the curtain with a bow.
- 07-20-2011 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 24
thanks. i want more details because i have not big enough exp to do that.
for example: what i must do for the second pc so that connect by first to second pc?
i must make a classical user accound? And On which state must be find the second pc so that connect with fisrt?
- 07-20-2011 #4
Install the sshd daemon with the package manager of your linux distribution (which one do you have?).
Start the daemonCode:yum install openssh-server or apt-get install openssh-server
If your client machine and the machine running the sshd are in the same network, then this is already enough.Code:/etc/init.d/sshd start
Any user should be able to connect with
Note, that sometimes the sshd config forbids root logins to heightein security a little bit.Code:ssh <user>@<sshd-machine>
As in:
An attacker would need two credentials to get root access instead of oneYou must always face the curtain with a bow.
- 07-20-2011 #5Just Joined!
- Join Date
- Jun 2010
- Posts
- 24
ok. the sshd is in my machine. I do some confiquration in sshd_config. I make a user account (username:test) and i put allowuser test at the end of config file .
Now when i try(by other ip) to connect with:
ssh -p 22 test@my ip itake the error that no root, no host
why?
- 07-21-2011 #6Linux Guru
- Join Date
- May 2011
- Posts
- 1,838
1. allowuser test would not work in sshd_config. you want AllowUsers test (it is case-insensitive, but the ending s is required).
man sshd_config for more details
2. You need to restart the SSH daemon after modifying sshd_config - if you had, you would have seen it fail to start b/c of the misconfiguration.
Can you print the exact SSH command that you attempted and also the exact SSH error message? What you've shown is a bit confusing.
Also just try logging in as your test user from the local machine first, e.g.:
Code:ssh test@localhost
- 07-21-2011 #7Just Joined!
- Join Date
- Jun 2010
- Posts
- 24
tell me if i do anywhere wrong.
1. i use: ssh test@(external ip of router where at each connection is different due to DHCP)
2. the test user is created as simple user of linux (useradd...)
3. i have disable the firewall (but i have run all procedure and with firewall without difs).
here i have tried to connect by other pc (connection):
an i took the follow mes (the xxx.xx... is external ip):
ssh: connect to host xxx..xxx.xxx.xxx port 22: Connection timed out
Maybe i have non configure well my config file? can you send me a example for my use?
- 07-21-2011 #8
The sshd is either not running or not reachable.
On the machine, can you see the daemon?
Code:netstat -tunlp |grep ssh
You must always face the curtain with a bow.
- 07-21-2011 #9Linux Guru
- Join Date
- May 2011
- Posts
- 1,838
Did you try to SSH in from the same machine that your SSH daemon is running on(ssh test@localhost)?
From your client PC, can you ping the SSH server PC?
- 07-21-2011 #10Just Joined!
- Join Date
- Jun 2010
- Posts
- 24
the deamon ( netstate) give:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2858/sshd
what is mean this?
Also, i have only put the external ip at ssh . Is not necessary the internal ip by router to host?


Reply With Quote