SSH 22


Flaber
coolspeak.gif Salutare.. iarasi smile.gif

- Am si eu nevoie de o arhiva ceva pentru ... deshis port SSH 22 ... dar va rog eu smile.gif nu Root Kit`uri etc.. ca dejaba va mai chinuiti sa mi le dati.. ca le am cu as a cvea biggrin.gif ..

- Sau Poate mai bine exista niste comenzi de deschis acest port... !

- A... sa nu uit.. sa mentionez.. ca folosesk Linux Xandros 2 ! ..:Pdar nu cred ca are mare importanta !

thumbup.gif - Multumesk..!!! cheers.gif
cianura
QUOTE(Flaber @ Apr 3 2005, 11:25)
coolspeak.gif  Salutare.. iarasi smile.gif
- Am si eu nevoie de o arhiva ceva pentru ... deshis port SSH 22 ... dar va rog eu smile.gif nu Root Kit`uri etc.. ca dejaba va mai chinuiti sa mi le dati.. ca le am cu as a cvea biggrin.gif ..
*


root-kituri... yeah, rrrright.....

QUOTE(Flaber @ Apr 3 2005, 11:25)
- Sau Poate mai bine exista niste comenzi de deschis acest port... !
*


/etc/ssh/sshd_config fisierul de configurare;

ca root, dai
/etc/init.d/sshd start sau
/etc/rc.d/rc.sshd start
In functie de cum e organizata distributia ta.

In sub-directoarele init.d sau rc.d din directorul /etc se afla scripturile de pornire/oprire de servicii. Citeste in acele fisiere ca sa vezi ce si cum se da drumul la un server.

PS: termina te rog cu aberatiile astea gramaticale gen folosesk/multumesk pt ca nu sintem pe mirc aici.
Flaber
Am intrat in : /etc/init.d/ si nu exista nici un "sshd" sad.gif si nici in /etc/rc.d/ sad.gif

-in cd /etc/init.d/ estia numai as acvea :


. diald network-status skeleton
.. dns-clean networking slpd
README dosplashFX networking.dpkg-old startreboot.sh
acpid exim nfs-common startshutdown.sh
apache halt nfs-user-server stop-bootlogd
apmd hostname.sh nviboot sysklogd
atd hwclock.sh pcmcia tpconfig
aumix hwclockfirst.sh portmap umountfs
bootlogd ifupdown ppp umountnfs.sh
bootmisc.sh inetd pppd-dns unsplashFX
checkfs.sh iptables procps.sh urandom
checkroot.sh isapnp proftpd woddity
checkroot.sh.dpkg-old kdm rc xandros-autofs
console-screen.sh kdm-nd rcS xandros-detection
cron keymap.sh reboot xandros-hotplug
cupsys klogd rmnologin xandros-loopback
deepsix.sh makedev safemode_kdm xfree86-common
devfsd modutils samba
devpts.sh mountall.sh sendsigs
dhcp-client mountnfs.sh single




-si in /etc/rc.d/ estista numai: . .. rc.pcmcia sad.gif


poate mai pot intr`un fel... 10x
cianura
QUOTE(Flaber @ Apr 3 2005, 12:54)
Am intrat in :  /etc/init.d/  si nu exista nici un "sshd" sad.gif si nici in /etc/rc.d/  sad.gif
*


uita-te in atunci si in /etc/init/rc daca e director. Daca nu, incearca sa dai la linie de comanda ca root: whereis sshd sau locate sshd. Daca nu iti returneaza nici o cale, atunci asta e, trebuie sa il instalezi fie de pe discul distributiei fie sa il iei online.
Flaber
salut...

-zice ca nu exista acea locatie sad.gif(

sh: cd: /etc/init/rc: No such file or directory
sh: cd: /etc/init/: No such file or directory

-si la whereis sshd arata numai atat :

whereis sshd
sshd:

-la locate sshd zice asa :

locate sshd
locate: /var/cache/locate/locatedb: No such file or directory


- daca ma mai puteti ajuta e bine.. daca nu Multumesk pt. atat. sunteti tari ! coolspeak.gif
mufa
Nu, nu te putem ajuta. Problemele tale sunt mult prea complexe si ne depasesc.

later edit: Aceasta distributie pe care o folosesti, xandros, ce manager de pachete foloseste?
cmidp
QUOTE(Flaber @ Apr 4 2005, 07:41)
salut...

-zice ca nu exista acea locatie sad.gif(

sh: cd: /etc/init/rc: No such file or directory
sh: cd: /etc/init/: No such file or directory

-si la whereis sshd arata numai atat :

whereis sshd
sshd:

-la locate sshd zice asa :

locate sshd
locate: /var/cache/locate/locatedb: No such file or directory
- daca ma mai puteti ajuta e bine.. daca nu Multumesk pt. atat. sunteti tari !  coolspeak.gif
*


1. ca fapt divers: esti sigur ca ai ssh-ul instalat?

2. updatedb & (si astepti)

3. apoi incerci din nou sa dai locate
marco71
apt-get install openssh (xandros e debian-based)
GabyBoy
-am si eu aceeasi problema cu ssh`ul pe xandros sad.gif am dat tot ce ati spus voi.. si as aimi zice :

- cand dau "apt-get install openssh" asa zice:

apt-get install openssh
Reading Package Lists... Done
Building Dependency Tree... Done
W: Couldn't stat source package list http://xnv2.xandros.com xandros2.0-xn/main Packages (/var/lib/apt/lists/xnv2.xandros.com_2.0_pkg_dists_xandros2.0-xn_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://xnv2.xandros.com xandros2.0-xn/contrib Packages (/var/lib/apt/lists/xnv2.xandros.com_2.0_pkg_dists_xandros2.0-xn_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://xnv2.xandros.com xandros2.0-xn/non-free Packages (/var/lib/apt/lists/xnv2.xandros.com_2.0_pkg_dists_xandros2.0-xn_non-free_binary-i386_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: Couldn't find package openssh


-cand dau "updatedb &" as azice:

updatedb &
[1] 1058


-si cand dau "locale" as azice:

locale
LANG=POSIX
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"LC_ALL=

LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"


- poate ma puteti ajuta in continuare.. msss...!
mdk10.1
Aceiasi problema am si eu cu ssh22 dar eu am o distributie Mandrake 10.1 ma puteti ajuta dar mai pe intelesul unui novice in ale linuxului si daca este posibil un tutorial in romana. worthy.gif
mufa
GabyBoy: apt-get update inainte de apt-get install openssh
cmidp
Este *locate* nu locale.
GabyBoy
salut.. am si eu un redhat 8.0 si vreau sa deshid ssh 22.

cand dau ./sshd start zice :

./sshd start
Starting sshd: [ OK ]

dar cand vreau sa intru pe ssh 22 nu merge... conection refused...! dc oare????
mufa
QUOTE(GabyBoy @ Apr 19 2005, 09:41)
salut.. am si eu un redhat 8.0  si vreau sa deshid ssh 22.
dar cand vreau sa intru pe ssh 22 nu merge... conection refused...! dc oare????
*

/var/log/secure ce spune ?
GabyBoy
asta zice..... :


cat /var/log/secure
Apr 17 15:19:23 localhost sshd[560]: Server listening on 0.0.0.0 port 22.
Apr 17 15:20:25 localhost sshd[560]: Received signal 15; terminating.
Apr 17 15:33:41 localhost sshd[570]: Server listening on 0.0.0.0 port 22.
Apr 17 15:36:46 localhost sshd[570]: Received signal 15; terminating.
Apr 17 15:41:47 localhost sshd[571]: Server listening on 0.0.0.0 port 22.
Apr 17 15:43:42 localhost sshd[571]: Received signal 15; terminating.
Apr 17 15:46:54 localhost sshd[571]: Server listening on 0.0.0.0 port 22.
Apr 17 17:06:13 localhost sshd[539]: Server listening on 0.0.0.0 port 22.
Apr 17 17:06:58 localhost sshd[539]: Received signal 15; terminating.
Apr 17 17:12:19 localhost sshd[689]: Server listening on 0.0.0.0 port 22.
Apr 17 17:49:31 localhost sshd[689]: Received signal 15; terminating.
Apr 17 17:52:54 localhost sshd[717]: Server listening on 0.0.0.0 port 22.
Apr 17 20:54:39 localhost sshd[717]: Received signal 15; terminating.
Apr 17 20:58:06 localhost sshd[717]: Server listening on 0.0.0.0 port 22.
Apr 17 22:47:21 localhost sshd[727]: Server listening on 0.0.0.0 port 22.
Apr 17 23:04:52 localhost sshd[727]: Received signal 15; terminating.
Apr 17 23:08:27 localhost sshd[716]: Server listening on 0.0.0.0 port 22.
Apr 19 01:20:11 localhost sshd[663]: Server listening on 0.0.0.0 port 22.
Apr 19 01:24:48 localhost sshd[572]: Server listening on 0.0.0.0 port 22.
Apr 19 01:32:48 localhost sshd[671]: Server listening on 0.0.0.0 port 22.
Apr 19 01:34:45 localhost sshd[671]: Received signal 15; terminating.
Apr 19 01:50:28 localhost sshd[714]: Server listening on 0.0.0.0 port 22.
Apr 19 02:00:08 localhost sshd[711]: Server listening on 0.0.0.0 port 22.
Apr 19 02:03:02 localhost sshd[618]: Server listening on 0.0.0.0 port 22.
Apr 19 02:04:20 localhost sshd[618]: Received signal 15; terminating.
Apr 19 02:16:15 localhost sshd[833]: Server listening on 0.0.0.0 port 22.
Apr 19 09:19:00 localhost sshd[731]: Server listening on 0.0.0.0 port 22.
Apr 19 09:33:54 localhost sshd[953]: error: Bind to port 22 on 0.0.0.0 failed: A
ddress already in use.
Apr 19 09:33:54 localhost sshd[953]: fatal: Cannot bind any address.
Apr 19 10:17:10 localhost sshd[730]: Server listening on 0.0.0.0 port 22.




ce sa fac.. ?sad.gif(((
mufa
killall -9 sshd (ai grija sa nu fii legat remote)
/etc/init.d/sshd start
GabyBoy
tot nu se deshide sad.gif((
mufa
QUOTE(GabyBoy @ Apr 19 2005, 11:12)
tot nu se deshide sad.gif((
*

Ma bucur. /var/log/secure ce spune de data asta?
Daca tot "List-PBind to port 22 on 0.0.0.0 failed: Address already in use." vezi cine asculta pe portul 22 si de ce.
GabyBoy
de data asta asa scire...:


cat /var/log/secure
Apr 17 15:19:23 localhost sshd[560]: Server listening on 0.0.0.0 port 22.
Apr 17 15:20:25 localhost sshd[560]: Received signal 15; terminating.
Apr 17 15:33:41 localhost sshd[570]: Server listening on 0.0.0.0 port 22.
Apr 17 15:36:46 localhost sshd[570]: Received signal 15; terminating.
Apr 17 15:41:47 localhost sshd[571]: Server listening on 0.0.0.0 port 22.
Apr 17 15:43:42 localhost sshd[571]: Received signal 15; terminating.
Apr 17 15:46:54 localhost sshd[571]: Server listening on 0.0.0.0 port 22.
Apr 17 17:06:13 localhost sshd[539]: Server listening on 0.0.0.0 port 22.
Apr 17 17:06:58 localhost sshd[539]: Received signal 15; terminating.
Apr 17 17:12:19 localhost sshd[689]: Server listening on 0.0.0.0 port 22.
Apr 17 17:49:31 localhost sshd[689]: Received signal 15; terminating.
Apr 17 17:52:54 localhost sshd[717]: Server listening on 0.0.0.0 port 22.
Apr 17 20:54:39 localhost sshd[717]: Received signal 15; terminating.
Apr 17 20:58:06 localhost sshd[717]: Server listening on 0.0.0.0 port 22.
Apr 17 22:47:21 localhost sshd[727]: Server listening on 0.0.0.0 port 22.
Apr 17 23:04:52 localhost sshd[727]: Received signal 15; terminating.
Apr 17 23:08:27 localhost sshd[716]: Server listening on 0.0.0.0 port 22.
Apr 19 01:20:11 localhost sshd[663]: Server listening on 0.0.0.0 port 22.
Apr 19 01:24:48 localhost sshd[572]: Server listening on 0.0.0.0 port 22.
Apr 19 01:32:48 localhost sshd[671]: Server listening on 0.0.0.0 port 22.
Apr 19 01:34:45 localhost sshd[671]: Received signal 15; terminating.
Apr 19 01:50:28 localhost sshd[714]: Server listening on 0.0.0.0 port 22.
Apr 19 02:00:08 localhost sshd[711]: Server listening on 0.0.0.0 port 22.
Apr 19 02:03:02 localhost sshd[618]: Server listening on 0.0.0.0 port 22.
Apr 19 02:04:20 localhost sshd[618]: Received signal 15; terminating.
Apr 19 02:16:15 localhost sshd[833]: Server listening on 0.0.0.0 port 22.
Apr 19 09:19:00 localhost sshd[731]: Server listening on 0.0.0.0 port 22.
Apr 19 09:33:54 localhost sshd[953]: error: Bind to port 22 on 0.0.0.0 failed: A
ddress already in use.
Apr 19 09:33:54 localhost sshd[953]: fatal: Cannot bind any address.
Apr 19 10:17:10 localhost sshd[730]: Server listening on 0.0.0.0 port 22.
Apr 19 11:02:59 localhost sshd[731]: Server listening on 0.0.0.0 port 22.
Apr 19 11:09:20 localhost sshd[936]: Server listening on 0.0.0.0 port 22.

ce sa fac ??? dar daca tot nu merge ssh 22 pot sa deshid macat telnetu 23 ???? cum ?
mercy
mufa
Dupa ce incearca sa faci ssh pe masina respectiva, uita-te in /var/log/messages dupa ssh si vezi ce zice.
GabyBoy
sunt foarte numte ... mesaje (linii) in /var/log/messages


eu ti le atay pe ultimele... ca daca ma-s apuka sa le pun pe toate ar ocupa toto forumu ..tongue.gif

Apr 19 11:06:27 localhost kernel: eth1: link up.
Apr 19 11:06:27 localhost kernel: eth1: Setting full-duplex based on negotiated link capability.
Apr 19 11:06:28 localhost /etc/hotplug/net.agent: invoke ifup eth1
Apr 19 11:09:20 localhost sshd: succeeded
Apr 19 11:11:12 localhost login(pam_unix)[825]: session closed for user root
Apr 19 11:34:18 localhost sshd: succeeded


??
mufa
QUOTE(GabyBoy @ Apr 19 2005, 11:39)
sunt foarte numte ... mesaje (linii) in  /var/log/messages
eu ti le atay pe ultimele... ca daca ma-s apuka sa le pun pe toate ar ocupa toto forumu ..tongue.gif

Apr 19 11:06:27 localhost kernel: eth1: link up.
Apr 19 11:06:27 localhost kernel: eth1: Setting full-duplex based on negotiated link capability.
Apr 19 11:06:28 localhost /etc/hotplug/net.agent: invoke ifup eth1
Apr 19 11:09:20 localhost sshd:  succeeded
Apr 19 11:11:12 localhost login(pam_unix)[825]: session closed for user root
Apr 19 11:34:18 localhost sshd:  succeeded
??
*

ssh -v localhost arata ceva interesant?
GabyBoy
asa zice... :

ssh -v localhost
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.4p1
debug1: match: OpenSSH_3.4p1 pat OpenSSH*
Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.4p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 124/256
debug1: bits set: 1582/3191
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is b0:f6:89:94:38:63:10:42:98:2e:c8:83:cc:20:8d:02.
Are you sure you want to continue connecting (yes/no)? yes
yes

Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
debug1: bits set: 1631/3191
debug1: ssh_rsa_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: waiting for SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug1: next auth method to try is publickey
debug1: try privkey: /root/.ssh/identity
debug1: try privkey: /root/.ssh/id_rsa
debug1: try privkey: /root/.ssh/id_dsa
debug1: next auth method to try is keyboard-interactive
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug1: next auth method to try is password
root@localhost's password:

debug1: ssh-userauth2 successful: method password
debug1: channel 0: new [client-session]
debug1: send channel open 0
debug1: Entering interactive session.
debug1: ssh_session2_setup: id 0
debug1: channel request 0: pty-req
debug1: channel request 0: shell
debug1: fd 3 setting TCP_NODELAY
debug1: channel 0: open confirm rwindow 0 rmax 32768
Last login: Tue Apr 19 11:03:46 2005
No value for $TERM and no -T specified
No value for $TERM and no -T specified



ce sa fac ma ??? ori sa deshid ssh 22 ori telnet 23 ... asta vreu. ce sa fac ??????? pls
mufa
Daca incerci sa faci ssh pe masina respectiva de pe alta masina, ce se intimpla ?
Porneste si sshd-ul in debug mode si vezi ce se intimpla.
GabyBoy
nu inteleg ce vreis a zici
cianura
posibil sa nu te lase sa te loghezi ca root
ssh username@localhost

posibil sa nu te lase sa te loghezi de pe loopback/IP-ul masiniii; de pe o alta masina incearca:
ssh username@IP-masina-nazdravana

SSH merge la tine, trebuie sa verifici si ca nu ai vreun firewall prin zona.
GabyBoy
ok... acum o s avad tongue.gif ms..
GabyBoy
salut... Nustiu ce sa fac... am incercat din nou sa deshid ssh`ul 22... merge zice [OK] Dar cand incerc sa intru pe portu ala nu merge sad.gif(( ce se intampla... dc nu se deshide... sau dc nu merge sa intru pe portu ala ??! ce sa fac ??! mercy... poate de data asta gasim raspunsul la aceasta intrtebare care ma framanta de multa vreme biggrin.gif ... se poate ca sa existe firewall sis a nu dea voie sa intru pe portu ala ??? cum il scot.. sa imi dea voie sa intru ?? mercy mult tuturor !!!!!
GabyBoy
aha... am aflat ceva... am dat asa: ssh 10.13.0.1

si s-a conectat ...

Last login: Sun Apr 24 03:58:25 2005 from 10.13.0.1
No value for $TERM and no -T specified
No value for $TERM and no -T specified
[root@local root]# ps x

ma-m logat ca root.. dar acum nustiu cum sa deschid port pe ssh sa ma loghez direct.. acum am bind deschis pe telnet sad.gif si nu imi convine sa imi intre toti in el biggrin.gif

10.13.0.1 fiind ipul de pe server


stie cineva ce sa fac ?? sa mearga ssh`ul ?
Alice
oooooooooooooooooooooooof gramatica asta bat-o vina...
retele
QUOTE(GabyBoy @ Apr 24 2005, 03:57)
...mercy... mercy  mult tuturor !!!!!

Probabil tu îți închipui ca ești "jmeker", dar să știi că mercy înseamnă milă în engleză....
Ori folosești clasicul mulțumesc, ori mersi, sau franțuzescul merci...
GabyBoy
dar tu esti smecher ma ?
mai bine taci !
cianura
QUOTE(GabyBoy @ Apr 24 2005, 10:54)
dar tu esti smecher ma ?
mai bine taci !
*

[OT]
Atentie la limbaj. Valabil si pt tine si pt retele care sper sa nu se lase antrenat in flame. Oricum, din pctul meu de vedere sa stii ca retele are un punct de vedere intemeiat.[/OT]

Revenind, ai cautat sa vezi daca nu cumva ai firewall intre tine si server? Ai incercat sa te legi de la consola prin ssh?Ti-am spus ca e posibil ca login-ul de root sa fie dezactivat (si pe buna dreptate). Creaza un cont de user normal, te loghezi ca username@ip-host si apoi folosesti su sau sudo ca sa obtii drepturi de root.
GabyBoy
cred ca nu voi reusi niciodata sa deshid ssh`ul 22 sad.gif( nustiu ma cums a scot firewallu ala care nu imi da voie sa ma loghez pe ssh 22 sad.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.